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