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, getNode
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getNamespace
getElementName
protected 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 = null
itemsType
- Type of representationnodeId
- The node to which the items are being sent or deleteditems
- The list of Item
or RetractItem
public 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 RetractItem
public ItemsExtension.ItemsElementType getItemsElementType()
public List<ExtensionElement> getExtensions()
EmbeddedPacketExtension
ExtensionElement
objects.getExtensions
in interface EmbeddedPacketExtension
ExtensionElement
public List<? extends ExtensionElement> getItems()
Item
, RetractItem
, or nullpublic boolean getNotify()
ItemsExtension.ItemsElementType
.public CharSequence toXML()
Element
toXML
in interface Element
toXML
in class NodeExtension
public String toString()
toString
in class NodeExtension