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 NamedElement> |
items |
protected Boolean |
notify |
protected ItemsExtension.ItemsElementType |
type |
| Constructor and Description |
|---|
ItemsExtension(ItemsExtension.ItemsElementType itemsType,
String nodeId,
List<? extends NamedElement> 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 NamedElement> |
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(String enclosingNamespace)
Returns the XML representation of this Element.
|
getElementName, getNamespace, getNode, getPubSubNamespaceclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetNamespacegetElementNameprotected ItemsExtension.ItemsElementType type
protected List<? extends NamedElement> items
public ItemsExtension(ItemsExtension.ItemsElementType itemsType, String nodeId, List<? extends NamedElement> 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 = null
itemsType - 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 = null
nodeId - The node to which the items are being sent or deleteditems - The list of Item or RetractItemnotify - public ItemsExtension.ItemsElementType getItemsElementType()
public List<ExtensionElement> getExtensions()
EmbeddedPacketExtensionExtensionElement objects.getExtensions in interface EmbeddedPacketExtensionExtensionElementpublic List<? extends NamedElement> getItems()
Item, RetractItem, or nullpublic boolean getNotify()
ItemsExtension.ItemsElementType.public CharSequence toXML(String enclosingNamespace)
ElementtoXML in interface ElementtoXML in class NodeExtensionenclosingNamespace - the enclosing namespace or null.public String toString()
toString in class NodeExtension