Class NodeExtension

java.lang.Object
org.jivesoftware.smackx.pubsub.NodeExtension
All Implemented Interfaces:
org.jivesoftware.smack.packet.Element, org.jivesoftware.smack.packet.NamedElement, org.jivesoftware.smack.packet.XmlElement, org.jivesoftware.smack.packet.XmlLangElement
Direct Known Subclasses:
AffiliationsExtension, ConfigurationEvent, FormNode, GetItemsRequest, Item, ItemsExtension, OptionsExtension, PublishItem, SubscribeExtension, Subscription, SubscriptionsExtension, UnsubscribeExtension

public class NodeExtension extends Object implements org.jivesoftware.smack.packet.XmlElement
A class which represents a common element within the pubsub defined schemas. One which has a node as an attribute. This class is used on its own as well as a base class for many others, since the node is a central concept to most pubsub functionality.
  • Constructor Details

    • NodeExtension

      public NodeExtension(PubSubElementType elem, String nodeId)
      Constructs a NodeExtension with an element name specified by PubSubElementType and the specified node id.
      Parameters:
      elem - Defines the element name and namespace
      nodeId - Specifies the id of the node
    • NodeExtension

      public NodeExtension(PubSubElementType elem)
      Constructs a NodeExtension with an element name specified by PubSubElementType.
      Parameters:
      elem - Defines the element name and namespace
  • Method Details

    • getNode

      public String getNode()
      Gets the node id.
      Returns:
      The node id
    • getElementName

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

      public PubSubNamespace getPubSubNamespace()
    • getNamespace

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

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

      protected void addXml(org.jivesoftware.smack.util.XmlStringBuilder xml)
    • toString

      public String toString()
      Overrides:
      toString in class Object