public class DiscoverInfo extends org.jivesoftware.smack.packet.IQ implements DiscoverInfoView
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 java.lang.String |
ELEMENT |
static java.lang.String |
NAMESPACE |
| Constructor and Description |
|---|
DiscoverInfo()
Deprecated.
use
DiscoverInfoBuilder instead. |
DiscoverInfo(DiscoverInfo d)
Copy constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
addFeature(DiscoverInfo.Feature feature)
Deprecated.
use
DiscoverInfoBuilder.addFeature(DiscoverInfo.Feature) instead. |
boolean |
addFeature(java.lang.String feature)
Deprecated.
use
DiscoverInfoBuilder.addFeature(String) instead. |
void |
addFeatures(java.util.Collection<java.lang.String> featuresToAdd)
Deprecated.
use
DiscoverInfoBuilder.addFeatures(Collection) instead. |
void |
addIdentities(java.util.Collection<DiscoverInfo.Identity> identitiesToAdd)
Deprecated.
use
DiscoverInfoBuilder.addIdentities(Collection) instead. |
void |
addIdentity(DiscoverInfo.Identity identity)
Deprecated.
|
DiscoverInfoBuilder |
asBuilder(java.lang.String stanzaId) |
static DiscoverInfoBuilder |
builder(org.jivesoftware.smack.packet.IqData iqData) |
static DiscoverInfoBuilder |
builder(java.lang.String stanzaId) |
static DiscoverInfoBuilder |
builder(org.jivesoftware.smack.XMPPConnection connection) |
DiscoverInfo |
clone()
Deprecated.
use
asBuilder(String) instead. |
boolean |
containsDuplicateFeatures()
Test if a DiscoverInfo response contains duplicate features.
|
boolean |
containsDuplicateIdentities()
Test if a DiscoverInfo response contains duplicate identities.
|
boolean |
containsFeature(java.lang.CharSequence feature)
Returns true if the specified feature is part of the discovered information.
|
java.util.List<DiscoverInfo.Feature> |
getFeatures()
Returns the discovered features of an XMPP entity.
|
java.util.List<DiscoverInfo.Identity> |
getIdentities()
Returns the discovered identities of an XMPP entity.
|
java.util.List<DiscoverInfo.Identity> |
getIdentities(java.lang.String category,
java.lang.String type)
Returns all Identities of the given category and type of this DiscoverInfo.
|
protected org.jivesoftware.smack.packet.IQ.IQChildElementXmlStringBuilder |
getIQChildElementBuilder(org.jivesoftware.smack.packet.IQ.IQChildElementXmlStringBuilder xml) |
java.lang.String |
getNode()
Returns the node attribute that supplements the 'jid' attribute.
|
boolean |
hasIdentity(java.lang.String category,
java.lang.String type)
Returns true if this DiscoverInfo contains at least one Identity of the given category and type.
|
static boolean |
nullSafeContainsFeature(DiscoverInfo discoverInfo,
java.lang.CharSequence feature) |
void |
setNode(java.lang.String node)
Deprecated.
use
DiscoverInfoBuilder.setNode(String) instead. |
createErrorResponse, createErrorResponse, createErrorResponse, createResultIQ, getChildElementName, getChildElementNamespace, getChildElementQName, getChildElementXML, getElementName, getType, setType, toString, toXMLaddCommonAttributes, addExtension, addExtensions, appendErrorIfExists, getDefaultLanguage, getError, getExtension, getExtension, getExtension, getExtensionElement, getExtensions, getExtensions, getExtensions, getExtensions, getExtensionsMap, getFrom, getLanguage, getNamespace, getStanzaId, getTo, hasExtension, hasExtension, hasStanzaIdSet, logCommonAttributes, overrideExtension, removeExtension, removeExtension, setError, setError, setFrom, setLanguage, setNewStanzaId, setStanzaId, setStanzaId, setTo, throwIfNoStanzaIdequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetType, isRequestIQ, isResponseIQpublic static final java.lang.String ELEMENT
public static final java.lang.String NAMESPACE
@Deprecated public DiscoverInfo()
DiscoverInfoBuilder instead.public DiscoverInfo(DiscoverInfo d)
d - TODO javadoc me please@Deprecated public boolean addFeature(java.lang.String feature)
DiscoverInfoBuilder.addFeature(String) instead.feature - the discovered feature@Deprecated public void addFeatures(java.util.Collection<java.lang.String> featuresToAdd)
DiscoverInfoBuilder.addFeatures(Collection) instead.featuresToAdd - TODO javadoc me please@Deprecated public boolean addFeature(DiscoverInfo.Feature feature)
DiscoverInfoBuilder.addFeature(DiscoverInfo.Feature) instead.feature - the future.public java.util.List<DiscoverInfo.Feature> getFeatures()
DiscoverInfoViewgetFeatures in interface DiscoverInfoView@Deprecated public void addIdentity(DiscoverInfo.Identity identity)
DiscoverInfoBuilder.addIdentity(DiscoverInfo.Identity) instead.identity - the discovered entity's identity@Deprecated public void addIdentities(java.util.Collection<DiscoverInfo.Identity> identitiesToAdd)
DiscoverInfoBuilder.addIdentities(Collection) instead.identitiesToAdd - TODO javadoc me pleasepublic java.util.List<DiscoverInfo.Identity> getIdentities()
DiscoverInfoViewgetIdentities in interface DiscoverInfoViewpublic boolean hasIdentity(java.lang.String category,
java.lang.String type)
category - the category to look for.type - the type to look for.public java.util.List<DiscoverInfo.Identity> getIdentities(java.lang.String category, java.lang.String type)
category - category the category to look for.type - type the type to look for.public java.lang.String getNode()
DiscoverInfoViewNode attributes SHOULD be used only when trying to provide or query information which is not directly addressable.
getNode in interface DiscoverInfoView@Deprecated public void setNode(java.lang.String node)
DiscoverInfoBuilder.setNode(String) instead.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(java.lang.CharSequence feature)
feature - the feature to checkpublic static boolean nullSafeContainsFeature(DiscoverInfo discoverInfo, java.lang.CharSequence feature)
protected org.jivesoftware.smack.packet.IQ.IQChildElementXmlStringBuilder getIQChildElementBuilder(org.jivesoftware.smack.packet.IQ.IQChildElementXmlStringBuilder xml)
getIQChildElementBuilder in class org.jivesoftware.smack.packet.IQpublic boolean containsDuplicateIdentities()
public boolean containsDuplicateFeatures()
public DiscoverInfoBuilder asBuilder(java.lang.String stanzaId)
@Deprecated public DiscoverInfo clone()
asBuilder(String) instead.clone in class java.lang.Objectpublic static DiscoverInfoBuilder builder(org.jivesoftware.smack.XMPPConnection connection)
public static DiscoverInfoBuilder builder(org.jivesoftware.smack.packet.IqData iqData)
public static DiscoverInfoBuilder builder(java.lang.String stanzaId)