Package org.jivesoftware.smack.packet
Class StandardExtensionElement
java.lang.Object
org.jivesoftware.smack.packet.StandardExtensionElement
- All Implemented Interfaces:
Element
,NamedElement
,XmlElement
,XmlLangElement
An
ExtensionElement
modeling the often required and used XML features when using XMPP. It
is therefore suitable for most use cases. Use
builder(String, String)
to build these elements.
Note the this is only meant as catch-all if no particular extension element provider is registered. Protocol implementations should prefer to model their own extension elements tailored to their use cases.
- Since:
- 4.2
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionStandardExtensionElement
(String name, String namespace) Constructs a new extension element with the given name and namespace and nothing else. -
Method Summary
Modifier and TypeMethodDescriptiongetAttributeValue
(String attribute) Returns the root element name.getElements
(String element) getElements
(String element, String namespace) getFirstElement
(String element) getFirstElement
(String element, String namespace) Returns the root element XML namespace.getText()
toXML
(XmlEnvironment enclosingNamespace) 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.XmlElement
getLanguage, getQName
-
Constructor Details
-
StandardExtensionElement
Constructs a new extension element with the given name and namespace and nothing else. This is meant to construct extension elements used as simple flags in Stanzas.- Parameters:
name
- the name of the extension element.namespace
- the namespace of the extension element.
-
-
Method Details
-
getElementName
Description copied from interface:NamedElement
Returns the root element name.- Specified by:
getElementName
in interfaceNamedElement
- Returns:
- the element name.
-
getNamespace
Description copied from interface:XmlElement
Returns the root element XML namespace.- Specified by:
getNamespace
in interfaceXmlElement
- Returns:
- the namespace.
-
getAttributeValue
-
getAttributes
-
getFirstElement
-
getFirstElement
-
getElements
-
getElements
-
getElements
-
getText
-
toXML
-
builder
-