public class ItemsExtension extends NodeExtension implements EmbeddedPacketExtension
Please note, this class is used for internal purposes, and is not required for usage of pubsub functionality.
| Modifier and Type | Class and Description |
|---|---|
static class |
ItemsExtension.ItemsElementType |
| Modifier and Type | Field and Description |
|---|---|
protected java.util.List<? extends PacketExtension> |
items |
protected java.lang.Boolean |
notify |
protected ItemsExtension.ItemsElementType |
type |
| Constructor and Description |
|---|
ItemsExtension(ItemsExtension.ItemsElementType itemsType,
java.lang.String nodeId,
java.util.List<? extends PacketExtension> items)
Construct an instance with a list representing items that have been published or deleted.
|
ItemsExtension(java.lang.String nodeId,
java.util.List<? extends PacketExtension> items,
boolean notify)
Construct an instance with a list representing items that have been published or deleted.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.List<PacketExtension> |
getExtensions()
Get the list of embedded
PacketExtension objects. |
java.util.List<? extends PacketExtension> |
getItems()
Gets the items related to the type of request or event.
|
ItemsExtension.ItemsElementType |
getItemsElementType()
Get the type of element
|
boolean |
getNotify()
Gets the value of the optional attribute related to the
ItemsExtension.ItemsElementType. |
java.lang.String |
toString() |
java.lang.CharSequence |
toXML()
Returns the XML representation of the PacketExtension.
|
getElementName, getNamespace, getNodeclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetElementName, getNamespaceprotected ItemsExtension.ItemsElementType type
protected java.lang.Boolean notify
protected java.util.List<? extends PacketExtension> items
public ItemsExtension(ItemsExtension.ItemsElementType itemsType, java.lang.String nodeId, java.util.List<? extends PacketExtension> items)
Valid scenarios are:
ItemsExtension.ItemsElementType.items, items = list of Item and an
optional value for the max_items attribute.
ItemsExtension.ItemsElementType.retract, items = list of Item containing
only id's and an optional value for the notify attribute.
ItemsExtension.ItemsElementType.items, items = list of Item and
attributeValue = null
ItemsExtension.ItemsElementType.items, items = list of RetractItem and
attributeValue = nullitemsType - Type of representationnodeId - The node to which the items are being sent or deleteditems - The list of Item or RetractItempublic ItemsExtension(java.lang.String nodeId,
java.util.List<? extends PacketExtension> items,
boolean notify)
Valid scenarios are:
ItemsExtension.ItemsElementType.items, items = list of Item and an
optional value for the max_items attribute.
ItemsExtension.ItemsElementType.retract, items = list of Item containing
only id's and an optional value for the notify attribute.
ItemsExtension.ItemsElementType.items, items = list of Item and
attributeValue = null
ItemsExtension.ItemsElementType.items, items = list of RetractItem and
attributeValue = nullnodeId - The node to which the items are being sent or deleteditems - The list of Item or RetractItempublic ItemsExtension.ItemsElementType getItemsElementType()
public java.util.List<PacketExtension> getExtensions()
EmbeddedPacketExtensionPacketExtension objects.getExtensions in interface EmbeddedPacketExtensionPacketExtensionpublic java.util.List<? extends PacketExtension> getItems()
Item, RetractItem, or nullpublic boolean getNotify()
ItemsExtension.ItemsElementType.public java.lang.CharSequence toXML()
PacketExtensiontoXML in interface PacketExtensiontoXML in class NodeExtensionpublic java.lang.String toString()
toString in class NodeExtension