public class DiscoverItems
extends org.jivesoftware.smack.packet.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 java.lang.String |
ELEMENT |
static java.lang.String |
NAMESPACE |
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(java.util.Collection<DiscoverItems.Item> itemsToAdd)
Adds a collection of items to the discovered information.
|
protected org.jivesoftware.smack.packet.IQ.IQChildElementXmlStringBuilder |
getIQChildElementBuilder(org.jivesoftware.smack.packet.IQ.IQChildElementXmlStringBuilder xml) |
java.util.List<DiscoverItems.Item> |
getItems()
Returns the discovered items of the queried XMPP entity.
|
java.lang.String |
getNode()
Returns the node attribute that supplements the 'jid' attribute.
|
void |
setNode(java.lang.String node)
Sets the node attribute that supplements the 'jid' attribute.
|
createErrorResponse, createResultIQ, getChildElementName, getChildElementNamespace, getChildElementXML, getType, isRequestIQ, setType, toXML
addCommonAttributes, addExtension, addExtensions, appendErrorIfExists, getDefaultLanguage, getError, getExtension, getExtension, getExtensions, getExtensions, getExtensionsXML, getFrom, getLanguage, getPacketID, getStanzaId, getTo, hasExtension, hasExtension, hasStanzaIdSet, removeExtension, removeExtension, setError, setFrom, setLanguage, setPacketID, setStanzaId, setTo, toString
public static final java.lang.String ELEMENT
public static final java.lang.String NAMESPACE
public void addItem(DiscoverItems.Item item)
item
- the discovered entity's itempublic void addItems(java.util.Collection<DiscoverItems.Item> itemsToAdd)
itemsToAdd
- public java.util.List<DiscoverItems.Item> getItems()
public java.lang.String getNode()
Node attributes SHOULD be used only when trying to provide or query information which is not directly addressable.
public void setNode(java.lang.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' attributeprotected org.jivesoftware.smack.packet.IQ.IQChildElementXmlStringBuilder getIQChildElementBuilder(org.jivesoftware.smack.packet.IQ.IQChildElementXmlStringBuilder xml)
getIQChildElementBuilder
in class org.jivesoftware.smack.packet.IQ