Class StanzaIdElement
- java.lang.Object
-
- org.jivesoftware.smackx.sid.element.StableAndUniqueIdElement
-
- org.jivesoftware.smackx.sid.element.StanzaIdElement
-
- All Implemented Interfaces:
Element
,ExtensionElement
,FullyQualifiedElement
,NamedElement
,XmlLangElement
public class StanzaIdElement extends StableAndUniqueIdElement
-
-
Constructor Summary
Constructors Constructor Description StanzaIdElement(java.lang.String by)
StanzaIdElement(java.lang.String id, java.lang.String by)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getBy()
java.lang.String
getElementName()
Returns the root element name.java.lang.String
getNamespace()
Returns the root element XML namespace.static StanzaIdElement
getStanzaId(Message message)
Return the stanza-id element of a message.static boolean
hasStanzaId(Message message)
Return true, if a message contains a stanza-id element.XmlStringBuilder
toXML(XmlEnvironment enclosingNamespace)
-
Methods inherited from class org.jivesoftware.smackx.sid.element.StableAndUniqueIdElement
getId
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jivesoftware.smack.packet.FullyQualifiedElement
getLanguage, getQName
-
-
-
-
Field Detail
-
ELEMENT
public static final java.lang.String ELEMENT
- See Also:
- Constant Field Values
-
NAMESPACE
public static final java.lang.String NAMESPACE
- See Also:
- Constant Field Values
-
QNAME
public static final javax.xml.namespace.QName QNAME
-
ATTR_BY
public static final java.lang.String ATTR_BY
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
StanzaIdElement
public StanzaIdElement(java.lang.String by)
-
StanzaIdElement
public StanzaIdElement(java.lang.String id, java.lang.String by)
-
-
Method Detail
-
hasStanzaId
public static boolean hasStanzaId(Message message)
Return true, if a message contains a stanza-id element.- Parameters:
message
- message- Returns:
- true if message contains stanza-id element, otherwise false.
-
getStanzaId
public static StanzaIdElement getStanzaId(Message message)
Return the stanza-id element of a message.- Parameters:
message
- message- Returns:
- stanza-id element of a jid, or null if absent.
-
getBy
public java.lang.String getBy()
-
getNamespace
public java.lang.String getNamespace()
Description copied from interface:FullyQualifiedElement
Returns the root element XML namespace.- Returns:
- the namespace.
-
getElementName
public java.lang.String getElementName()
Description copied from interface:NamedElement
Returns the root element name.- Returns:
- the element name.
-
toXML
public XmlStringBuilder toXML(XmlEnvironment enclosingNamespace)
-
-