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 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 EventElementfrom(Stanza stanza)StringgetElementName()Returns the root element name.NodeExtensiongetEvent()EventElementTypegetEventType()List<ExtensionElement>getExtensions()Get the list of embeddedExtensionElementobjects.StringgetNamespace()Returns the root element XML namespace.XmlStringBuildertoXML(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
-
-
-
-
Constructor Detail
-
EventElement
public EventElement(EventElementType eventType, NodeExtension eventExt)
-
-
Method Detail
-
getEventType
public EventElementType getEventType()
-
getExtensions
public List<ExtensionElement> getExtensions()
Description copied from interface:EmbeddedPacketExtensionGet the list of embeddedExtensionElementobjects.- Specified by:
getExtensionsin interfaceEmbeddedPacketExtension- Returns:
- List of embedded
ExtensionElement
-
getEvent
public NodeExtension getEvent()
-
getElementName
public String getElementName()
Description copied from interface:NamedElementReturns the root element name.- Specified by:
getElementNamein interfaceNamedElement- Returns:
- the element name.
-
getNamespace
public String getNamespace()
Description copied from interface:FullyQualifiedElementReturns the root element XML namespace.- Specified by:
getNamespacein interfaceFullyQualifiedElement- Returns:
- the namespace.
-
toXML
public XmlStringBuilder toXML(XmlEnvironment enclosingNamespace)
-
from
public static EventElement from(Stanza stanza)
-
-