Class InfoDiscovery
- java.lang.Object
-
- rocks.xmpp.extensions.disco.model.info.InfoDiscovery
-
- All Implemented Interfaces:
LanguageElement
,DiscoverableInfo
,ServiceDiscoveryNode
public final class InfoDiscovery extends Object implements DiscoverableInfo, ServiceDiscoveryNode, LanguageElement
The implementation of the<query/>
element in thehttp://jabber.org/protocol/disco#info
namespace.This class is immutable.
-
-
Constructor Summary
Constructors Constructor Description InfoDiscovery()
Creates an empty element, used for info discovery requests.InfoDiscovery(String node)
Creates an info discovery element with a node attribute.InfoDiscovery(String node, Collection<Identity> identities, Collection<String> features, Collection<DataForm> extensions)
InfoDiscovery(String node, Collection<Identity> identities, Collection<String> features, Collection<DataForm> extensions, Locale lang)
Creates an info discovery element, used in discovery info responses.InfoDiscovery(Collection<Identity> identities, Collection<String> features)
Creates an info discovery element, used in discovery info responses.InfoDiscovery(Collection<Identity> identities, Collection<String> features, Collection<DataForm> extensions)
Creates an info discovery element, used in discovery info responses.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
List<DataForm>
getExtensions()
Gets the service discovery extensions as described in XEP-0128: Service Discovery ExtensionsSet<String>
getFeatures()
Gets the features.Set<Identity>
getIdentities()
Gets the identities.Locale
getLanguage()
Gets the language, i.e. the value of the 'xml:lang' attribute.String
getNode()
Gets the node name.int
hashCode()
String
toString()
-
-
-
Field Detail
-
NAMESPACE
public static final String NAMESPACE
http://jabber.org/protocol/disco#info- See Also:
- Constant Field Values
-
-
Constructor Detail
-
InfoDiscovery
public InfoDiscovery()
Creates an empty element, used for info discovery requests.
-
InfoDiscovery
public InfoDiscovery(String node)
Creates an info discovery element with a node attribute.- Parameters:
node
- The node.
-
InfoDiscovery
public InfoDiscovery(Collection<Identity> identities, Collection<String> features)
Creates an info discovery element, used in discovery info responses.- Parameters:
identities
- The identitiesfeatures
- The features.
-
InfoDiscovery
public InfoDiscovery(Collection<Identity> identities, Collection<String> features, Collection<DataForm> extensions)
Creates an info discovery element, used in discovery info responses.- Parameters:
identities
- The identitiesfeatures
- The features.extensions
- The extensions.
-
InfoDiscovery
public InfoDiscovery(String node, Collection<Identity> identities, Collection<String> features, Collection<DataForm> extensions)
-
InfoDiscovery
public InfoDiscovery(String node, Collection<Identity> identities, Collection<String> features, Collection<DataForm> extensions, Locale lang)
Creates an info discovery element, used in discovery info responses.- Parameters:
node
- The node.identities
- The identitiesfeatures
- The features.extensions
- The extensions.lang
- The language.
-
-
Method Detail
-
getIdentities
public final Set<Identity> getIdentities()
Description copied from interface:DiscoverableInfo
Gets the identities.- Specified by:
getIdentities
in interfaceDiscoverableInfo
- Returns:
- The identities.
-
getFeatures
public final Set<String> getFeatures()
Description copied from interface:DiscoverableInfo
Gets the features.- Specified by:
getFeatures
in interfaceDiscoverableInfo
- Returns:
- The features.
-
getNode
public final String getNode()
Description copied from interface:ServiceDiscoveryNode
Gets the node name.- Specified by:
getNode
in interfaceServiceDiscoveryNode
- Returns:
- The node.
-
getExtensions
public final List<DataForm> getExtensions()
Description copied from interface:DiscoverableInfo
Gets the service discovery extensions as described in XEP-0128: Service Discovery Extensions- Specified by:
getExtensions
in interfaceDiscoverableInfo
- Returns:
- The service discovery extensions.
-
getLanguage
public final Locale getLanguage()
Description copied from interface:LanguageElement
Gets the language, i.e. the value of the 'xml:lang' attribute.- Specified by:
getLanguage
in interfaceLanguageElement
- Returns:
- The language.
-
-