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 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 by getEventType(). The embedded event information, which is specific to the event type, can be retrieved by the getEvent() method.
  • Field Details

    • ELEMENT

      public static final String ELEMENT
      The constant String "event".
      See Also:
    • NAMESPACE

      public static final String NAMESPACE
      The constant String "http://jabber.org/protocol/pubsub#event".
    • QNAME

      public static final QName QNAME
  • Constructor Details

  • Method Details

    • getEventType

      public EventElementType getEventType()
    • getExtensions

      public List<org.jivesoftware.smack.packet.XmlElement> getExtensions()
      Description copied from interface: EmbeddedPacketExtension
      Get the list of embedded ExtensionElement objects.
      Specified by:
      getExtensions in interface EmbeddedPacketExtension
      Returns:
      List of embedded ExtensionElement
    • getEvent

      public NodeExtension getEvent()
    • getElementName

      public String getElementName()
      Specified by:
      getElementName in interface org.jivesoftware.smack.packet.NamedElement
    • getNamespace

      public String getNamespace()
      Specified by:
      getNamespace in interface org.jivesoftware.smack.packet.XmlElement
    • toXML

      public org.jivesoftware.smack.util.XmlStringBuilder toXML(org.jivesoftware.smack.packet.XmlEnvironment enclosingNamespace)
      Specified by:
      toXML in interface org.jivesoftware.smack.packet.Element
    • from

      public static EventElement from(org.jivesoftware.smack.packet.Stanza stanza)