Class Item

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  Item.ItemNamespace  
    • Constructor Summary

      Constructors 
      Constructor Description
      Item()
      Create an empty Item with no id.
      Item​(java.lang.String itemId)
      Create an Item with an id but no payload.
      Item​(java.lang.String itemId, java.lang.String nodeId)
      Create an Item with an id and a node id.
      Item​(Item.ItemNamespace itemNamespace, java.lang.String itemId)
      Create an Item with an id but no payload.
      Item​(Item.ItemNamespace itemNamespace, java.lang.String itemId, java.lang.String nodeId)
      Create an Item with an id and a node id.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void addXml​(org.jivesoftware.smack.util.XmlStringBuilder xml)  
      java.lang.String getId()
      Get the item id.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, 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
    • Constructor Detail

      • Item

        public Item​(java.lang.String itemId)
        Create an Item with an id but no payload. This is a valid item for nodes which are configured so that ConfigureFormReader.isDeliverPayloads() is false.
        Parameters:
        itemId - The id if the item. It must be unique within the node unless overwriting and existing item. Passing null is the equivalent of calling Item().
      • Item

        public Item​(Item.ItemNamespace itemNamespace,
                    java.lang.String itemId)
        Create an Item with an id but no payload. This is a valid item for nodes which are configured so that ConfigureFormReader.isDeliverPayloads() is false.
        Parameters:
        itemNamespace - the namespace of the item.
        itemId - The id if the item. It must be unique within the node unless overwriting and existing item. Passing null is the equivalent of calling Item().
      • Item

        public Item​(java.lang.String itemId,
                    java.lang.String nodeId)
        Create an Item with an id and a node id.

        Note: This is not valid for publishing an item to a node, only receiving from one as part of Message. If used to create an Item to publish (via LeafNode.publish(Item), the server may return an error for an invalid packet.

        Parameters:
        itemId - The id of the item.
        nodeId - The id of the node which the item was published to.
      • Item

        public Item​(Item.ItemNamespace itemNamespace,
                    java.lang.String itemId,
                    java.lang.String nodeId)
        Create an Item with an id and a node id.

        Note: This is not valid for publishing an item to a node, only receiving from one as part of Message. If used to create an Item to publish (via LeafNode.publish(Item), the server may return an error for an invalid packet.

        Parameters:
        itemNamespace - the namespace of the item.
        itemId - The id of the item.
        nodeId - The id of the node which the item was published to.
    • Method Detail

      • getId

        public java.lang.String getId()
        Get the item id. Unique to the node it is associated with.
        Returns:
        The id
      • addXml

        protected void addXml​(org.jivesoftware.smack.util.XmlStringBuilder xml)
        Overrides:
        addXml in class NodeExtension