Package org.jivesoftware.smackx.pubsub
Class EventElement
- java.lang.Object
-
- org.jivesoftware.smackx.pubsub.EventElement
-
- All Implemented Interfaces:
Element
,ExtensionElement
,FullyQualifiedElement
,NamedElement
,XmlLangElement
,EmbeddedPacketExtension
public class EventElement extends java.lang.Object implements EmbeddedPacketExtension
Represents the top level element of a PubSub event extension. All types of PubSub events are represented by this class. The specific type can be found bygetEventType()
. The embedded event information, which is specific to the event type, can be retrieved by thegetEvent()
method.
-
-
Constructor Summary
Constructors Constructor Description EventElement(EventElementType eventType, NodeExtension eventExt)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static EventElement
from(Stanza stanza)
java.lang.String
getElementName()
Returns the root element name.NodeExtension
getEvent()
EventElementType
getEventType()
java.util.List<ExtensionElement>
getExtensions()
Get the list of embeddedExtensionElement
objects.java.lang.String
getNamespace()
Returns the root element XML namespace.XmlStringBuilder
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.FullyQualifiedElement
getLanguage, getQName
-
-
-
-
Field Detail
-
ELEMENT
public static final java.lang.String ELEMENT
The constant String "event".- See Also:
- Constant Field Values
-
NAMESPACE
public static final java.lang.String NAMESPACE
The constant String "http://jabber.org/protocol/pubsub#event".
-
QNAME
public static final javax.xml.namespace.QName QNAME
-
-
Constructor Detail
-
EventElement
public EventElement(EventElementType eventType, NodeExtension eventExt)
-
-
Method Detail
-
getEventType
public EventElementType getEventType()
-
getExtensions
public java.util.List<ExtensionElement> getExtensions()
Description copied from interface:EmbeddedPacketExtension
Get the list of embeddedExtensionElement
objects.- Specified by:
getExtensions
in interfaceEmbeddedPacketExtension
- Returns:
- List of embedded
ExtensionElement
-
getEvent
public NodeExtension getEvent()
-
getElementName
public java.lang.String getElementName()
Description copied from interface:NamedElement
Returns the root element name.- Specified by:
getElementName
in interfaceNamedElement
- Returns:
- the element name.
-
getNamespace
public java.lang.String getNamespace()
Description copied from interface:FullyQualifiedElement
Returns the root element XML namespace.- Specified by:
getNamespace
in interfaceFullyQualifiedElement
- Returns:
- the namespace.
-
toXML
public XmlStringBuilder toXML(XmlEnvironment enclosingNamespace)
-
from
public static EventElement from(Stanza stanza)
-
-