Package org.jivesoftware.smackx.pubsub
Class EventElement
- java.lang.Object
-
- org.jivesoftware.smackx.pubsub.EventElement
-
- All Implemented Interfaces:
org.jivesoftware.smack.packet.Element
,org.jivesoftware.smack.packet.ExtensionElement
,org.jivesoftware.smack.packet.NamedElement
,org.jivesoftware.smack.packet.XmlElement
,org.jivesoftware.smack.packet.XmlLangElement
,EmbeddedPacketExtension
public class EventElement extends java.lang.Object implements EmbeddedPacketExtension, org.jivesoftware.smack.packet.ExtensionElement
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(org.jivesoftware.smack.packet.Stanza stanza)
java.lang.String
getElementName()
NodeExtension
getEvent()
EventElementType
getEventType()
java.util.List<org.jivesoftware.smack.packet.XmlElement>
getExtensions()
Get the list of embeddedExtensionElement
objects.java.lang.String
getNamespace()
org.jivesoftware.smack.util.XmlStringBuilder
toXML(org.jivesoftware.smack.packet.XmlEnvironment enclosingNamespace)
-
-
-
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<org.jivesoftware.smack.packet.XmlElement> 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()
- Specified by:
getElementName
in interfaceorg.jivesoftware.smack.packet.NamedElement
-
getNamespace
public java.lang.String getNamespace()
- Specified by:
getNamespace
in interfaceorg.jivesoftware.smack.packet.XmlElement
-
toXML
public org.jivesoftware.smack.util.XmlStringBuilder toXML(org.jivesoftware.smack.packet.XmlEnvironment enclosingNamespace)
- Specified by:
toXML
in interfaceorg.jivesoftware.smack.packet.Element
-
from
public static EventElement from(org.jivesoftware.smack.packet.Stanza stanza)
-
-