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

      Fields 
      Modifier and Type Field Description
      static java.lang.String ELEMENT
      The constant String "event".
      static java.lang.String NAMESPACE
      The constant String "http://jabber.org/protocol/pubsub#event".
      static javax.xml.namespace.QName QNAME  
    • 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 embedded ExtensionElement objects.
      java.lang.String getNamespace()  
      org.jivesoftware.smack.util.XmlStringBuilder toXML​(org.jivesoftware.smack.packet.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.Element

        toXML, toXML
      • Methods inherited from interface org.jivesoftware.smack.packet.XmlElement

        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
    • Method Detail

      • getExtensions

        public java.util.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
      • getElementName

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

        public java.lang.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)