Class PayloadItem<E extends XmlElement>

    • Constructor Detail

      • PayloadItem

        public PayloadItem​(E payloadExt)
        Create an Item with no id and a payload The id will be set by the server.
        Parameters:
        payloadExt - A ExtensionElement which represents the payload data.
      • PayloadItem

        public PayloadItem​(String itemId,
                           E payloadExt)
        Create an Item with an id and payload.
        Parameters:
        itemId - The id of this item. It can be null if we want the server to set the id.
        payloadExt - A ExtensionElement which represents the payload data.
      • PayloadItem

        public PayloadItem​(String itemId,
                           String nodeId,
                           E payloadExt)
        Create an Item with an id, node id and payload.

        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 this item.
        nodeId - The id of the node the item was published to.
        payloadExt - A ExtensionElement which represents the payload data.
      • PayloadItem

        public PayloadItem​(Item.ItemNamespace itemNamespace,
                           String itemId,
                           String nodeId,
                           E payloadExt)
        Create an Item with an id, node id and payload.

        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 this item.
        nodeId - The id of the node the item was published to.
        payloadExt - A ExtensionElement which represents the payload data.