public class DiscoverInfo extends IQ implements Cloneable
The received information may contain one or more identities of the requested XMPP entity, and a list of supported features by the requested XMPP entity.
Modifier and Type | Class and Description |
---|---|
static class |
DiscoverInfo.Feature
Represents the features offered by the item.
|
static class |
DiscoverInfo.Identity
Represents the identity of a given XMPP entity.
|
Modifier and Type | Field and Description |
---|---|
static String |
NAMESPACE |
DEFAULT_LANGUAGE, ID_NOT_AVAILABLE
Constructor and Description |
---|
DiscoverInfo() |
DiscoverInfo(DiscoverInfo d)
Copy constructor
|
Modifier and Type | Method and Description |
---|---|
void |
addFeature(String feature)
Adds a new feature to the discovered information.
|
void |
addFeatures(Collection<String> featuresToAdd)
Adds a collection of features to the packet.
|
void |
addIdentities(Collection<DiscoverInfo.Identity> identitiesToAdd)
Adds identities to the DiscoverInfo stanza
|
void |
addIdentity(DiscoverInfo.Identity identity)
Adds a new identity of the requested entity to the discovered information.
|
DiscoverInfo |
clone() |
boolean |
containsDuplicateFeatures()
Test if a DiscoverInfo response contains duplicate features.
|
boolean |
containsDuplicateIdentities()
Test if a DiscoverInfo response contains duplicate identities.
|
boolean |
containsFeature(String feature)
Returns true if the specified feature is part of the discovered information.
|
CharSequence |
getChildElementXML()
Returns the sub-element XML section of the IQ packet, or null if there
isn't one.
|
List<DiscoverInfo.Feature> |
getFeatures()
Returns the discovered features of an XMPP entity.
|
List<DiscoverInfo.Identity> |
getIdentities()
Returns the discovered identities of an 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 DiscoverInfo()
public DiscoverInfo(DiscoverInfo d)
d
- public void addFeature(String feature)
feature
- the discovered featurepublic void addFeatures(Collection<String> featuresToAdd)
featuresToAdd
- public List<DiscoverInfo.Feature> getFeatures()
public void addIdentity(DiscoverInfo.Identity identity)
identity
- the discovered entity's identitypublic void addIdentities(Collection<DiscoverInfo.Identity> identitiesToAdd)
identitiesToAdd
- public List<DiscoverInfo.Identity> getIdentities()
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 boolean containsFeature(String feature)
feature
- the feature to checkpublic CharSequence getChildElementXML()
IQ
Extensions of this class must override this method.
getChildElementXML
in class IQ
public boolean containsDuplicateIdentities()
public boolean containsDuplicateFeatures()
public DiscoverInfo clone()