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 List<? extends ExtensionElement> |
items |
protected Boolean |
notify |
protected ItemsExtension.ItemsElementType |
type |
| Constructor and Description |
|---|
ItemsExtension(ItemsExtension.ItemsElementType itemsType,
String nodeId,
List<? extends ExtensionElement> items)
Construct an instance with a list representing items that have been published or deleted.
|
ItemsExtension(String nodeId,
List<? extends ExtensionElement> items,
boolean notify)
Construct an instance with a list representing items that have been published or deleted.
|
| Modifier and Type | Method and Description |
|---|---|
List<ExtensionElement> |
getExtensions()
Get the list of embedded
ExtensionElement objects. |
List<? extends ExtensionElement> |
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. |
String |
toString() |
CharSequence |
toXML()
Returns the XML representation of this Element.
|
getElementName, getNamespace, getNodeclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetNamespacegetElementNameprotected ItemsExtension.ItemsElementType type
protected List<? extends ExtensionElement> items
public ItemsExtension(ItemsExtension.ItemsElementType itemsType, String nodeId, List<? extends ExtensionElement> 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(String nodeId, List<? extends ExtensionElement> 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 List<ExtensionElement> getExtensions()
EmbeddedPacketExtensionExtensionElement objects.getExtensions in interface EmbeddedPacketExtensionExtensionElementpublic List<? extends ExtensionElement> getItems()
Item, RetractItem, or nullpublic boolean getNotify()
ItemsExtension.ItemsElementType.public CharSequence toXML()
ElementtoXML in interface ElementtoXML in class NodeExtensionpublic String toString()
toString in class NodeExtension