public class DiscoverItems extends IQ
The items could also be queried in order to discover if they contain items inside. Some items may be addressable by its JID and others may require to be addressed by a JID and a node name.
Modifier and Type | Class and Description |
---|---|
static class |
DiscoverItems.Item
An item is associated with an XMPP Entity, usually thought of a children of the parent
entity and normally are addressable as a JID.
|
Modifier and Type | Field and Description |
---|---|
static String |
NAMESPACE |
DEFAULT_LANGUAGE, ID_NOT_AVAILABLE
Constructor and Description |
---|
DiscoverItems() |
Modifier and Type | Method and Description |
---|---|
void |
addItem(DiscoverItems.Item item)
Adds a new item to the discovered information.
|
void |
addItems(Collection<DiscoverItems.Item> itemsToAdd)
Adds a collection of items to the discovered information.
|
XmlStringBuilder |
getChildElementXML()
Returns the sub-element XML section of the IQ packet, or null if there
isn't one.
|
List<DiscoverItems.Item> |
getItems()
Returns the discovered items of the queried XMPP entity.
|
String |
getNode()
Returns the node attribute that supplements the 'jid' attribute.
|
void |
setNode(String node)
Sets the node attribute that supplements the 'jid' attribute.
|
createErrorResponse, createResultIQ, getType, setType, toXML
addCommonAttributes, addExtension, addExtensions, equals, getDefaultLanguage, getError, getExtension, getExtension, getExtensions, getExtensionsXML, getFrom, getPacketID, getTo, getXmlns, hashCode, nextID, removeExtension, setDefaultXmlns, setError, setFrom, setPacketID, setTo, toString
public static final String NAMESPACE
public DiscoverItems()
public void addItem(DiscoverItems.Item item)
item
- the discovered entity's itempublic void addItems(Collection<DiscoverItems.Item> itemsToAdd)
itemsToAdd
- public List<DiscoverItems.Item> getItems()
public String getNode()
Node attributes SHOULD be used only when trying to provide or query information which is not directly addressable.
public void setNode(String node)
Node attributes SHOULD be used only when trying to provide or query information which is not directly addressable.
node
- the node attribute that supplements the 'jid' attributepublic XmlStringBuilder getChildElementXML()
IQ
Extensions of this class must override this method.
getChildElementXML
in class IQ