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(String by)
StanzaIdElement(String id, String by)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getBy()
String
getElementName()
Returns the root element name.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 String ELEMENT
- See Also:
- Constant Field Values
-
NAMESPACE
public static final String NAMESPACE
- See Also:
- Constant Field Values
-
ATTR_BY
public static final String ATTR_BY
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
StanzaIdElement
public StanzaIdElement(String by)
-
StanzaIdElement
public StanzaIdElement(String id, 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.
-
getNamespace
public String getNamespace()
Description copied from interface:FullyQualifiedElement
Returns the root element XML namespace.- Returns:
- the namespace.
-
getElementName
public String getElementName()
Description copied from interface:NamedElement
Returns the root element name.- Returns:
- the element name.
-
toXML
public XmlStringBuilder toXML(XmlEnvironment enclosingNamespace)
-
-