Package rocks.xmpp.extensions.disco
Interface ServiceDiscoveryManager
-
- All Superinterfaces:
DiscoverableInfo
,ExtensionProtocol
,IQHandler
- All Known Implementing Classes:
AbstractServiceDiscoveryManager
,ClientServiceDiscoveryManager
public interface ServiceDiscoveryManager extends IQHandler, ExtensionProtocol, DiscoverableInfo
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addFeature(String feature)
Adds a feature.void
addIdentity(Identity identity)
Adds an identity.boolean
addInfoProvider(InfoProvider infoProvider)
Adds an info provider.boolean
addItemProvider(ItemProvider itemProvider)
Adds an item provider.AsyncResult<DiscoverableInfo>
discoverInformation(Jid jid)
Discovers information about another XMPP entity.AsyncResult<DiscoverableInfo>
discoverInformation(Jid jid, String node)
Discovers information about another XMPP entity targeted at a specific node.AsyncResult<ItemNode>
discoverItems(Jid jid)
Discovers item associated with another XMPP entity.AsyncResult<ItemNode>
discoverItems(Jid jid, String node)
Discovers item associated with another XMPP entity.AsyncResult<ItemNode>
discoverItems(Jid jid, String node, ResultSetManagement resultSetManagement)
Discovers item associated with another XMPP entity.AsyncResult<ItemNode>
discoverItems(Jid jid, ResultSetManagement resultSet)
Discovers item associated with another XMPP entity.AsyncResult<List<Item>>
discoverServices(Jid jid, String feature)
Discovers a service on the given entity by its feature namespace.AsyncResult<List<Item>>
discoverServices(Jid jid, Identity identity)
Discovers a service on the given entity by its identity.DiscoverableInfo
getDefaultInfo()
Gets the root node.void
removeFeature(String feature)
Removes a feature.void
removeIdentity(Identity identity)
Removes an identity.boolean
removeInfoProvider(InfoProvider infoProvider)
Removes an info provider.boolean
removeItemProvider(ItemProvider itemProvider)
Removes an item provider.-
Methods inherited from interface rocks.xmpp.extensions.disco.model.info.DiscoverableInfo
getExtensions, getFeatures, getIdentities
-
Methods inherited from interface rocks.xmpp.core.ExtensionProtocol
getNamespace, isEnabled
-
Methods inherited from interface rocks.xmpp.core.stanza.IQHandler
getPayloadClass, handleRequest
-
-
-
-
Method Detail
-
discoverInformation
AsyncResult<DiscoverableInfo> discoverInformation(Jid jid)
Discovers information about another XMPP entity.3. Discovering Information About a Jabber Entity
A requesting entity may want to discover information about another entity on the network. The information desired generally is of two kinds:
- The target entity's identity.
- The features offered and protocols supported by the target entity.
- Parameters:
jid
- The entity's JID.- Returns:
- The async service discovery result.
-
discoverInformation
AsyncResult<DiscoverableInfo> discoverInformation(Jid jid, String node)
Discovers information about another XMPP entity targeted at a specific node.A disco#info query MAY also be directed to a specific node identifier associated with a JID.
- Parameters:
jid
- The entity's JID.node
- The node.- Returns:
- The async service discovery result.
- See Also:
discoverInformation(Jid)
-
discoverItems
AsyncResult<ItemNode> discoverItems(Jid jid)
Discovers item associated with another XMPP entity.- Parameters:
jid
- The JID.- Returns:
- The async result with the discovered items.
-
discoverItems
AsyncResult<ItemNode> discoverItems(Jid jid, ResultSetManagement resultSet)
Discovers item associated with another XMPP entity.- Parameters:
jid
- The JID.resultSet
- The result set management.- Returns:
- The async result with the discovered items.
-
discoverItems
AsyncResult<ItemNode> discoverItems(Jid jid, String node)
Discovers item associated with another XMPP entity.- Parameters:
jid
- The JID.node
- The node.- Returns:
- The async result with the discovered items.
-
discoverItems
AsyncResult<ItemNode> discoverItems(Jid jid, String node, ResultSetManagement resultSetManagement)
Discovers item associated with another XMPP entity.- Parameters:
jid
- The JID.node
- The node.resultSetManagement
- The result set management.- Returns:
- The async result with the discovered items.
-
discoverServices
AsyncResult<List<Item>> discoverServices(Jid jid, Identity identity)
Discovers a service on the given entity by its identity.E.g. to discover MUC services you could call this method with
Identity.conferenceText()
;This method is generally preferred over
discoverServices(Jid, String)
.- Parameters:
identity
- The identity.jid
- The XMPP entity, usually a server.- Returns:
- The services, that belong to the namespace.
-
discoverServices
AsyncResult<List<Item>> discoverServices(Jid jid, String feature)
Discovers a service on the given entity by its feature namespace.- Parameters:
feature
- The feature namespace.jid
- The XMPP entity, usually a server.- Returns:
- The async result with the services, that belong to the namespace.
-
addIdentity
void addIdentity(Identity identity)
Adds an identity.- Parameters:
identity
- The identity.- See Also:
removeIdentity(rocks.xmpp.extensions.disco.model.info.Identity)
-
removeIdentity
void removeIdentity(Identity identity)
Removes an identity.- Parameters:
identity
- The identity.- See Also:
addIdentity(rocks.xmpp.extensions.disco.model.info.Identity)
-
addFeature
void addFeature(String feature)
Adds a feature. Features should not be added or removed directly. Instead enable or disable the respective extension manager, which will then add or remove the feature. That way, supported features are consistent with enabled extension managers and service discovery won't reveal features, that are in fact not supported.- Parameters:
feature
- The feature.- See Also:
removeFeature(String)
-
removeFeature
void removeFeature(String feature)
Removes a feature.- Parameters:
feature
- The feature.- See Also:
addFeature(String)
-
addInfoProvider
boolean addInfoProvider(InfoProvider infoProvider)
Adds an info provider.- Parameters:
infoProvider
- The info provider.- Returns:
- true, if it has been successfully added.
- See Also:
removeInfoProvider(InfoProvider)
-
removeInfoProvider
boolean removeInfoProvider(InfoProvider infoProvider)
Removes an info provider.- Parameters:
infoProvider
- The info provider.- Returns:
- true, if it has been successfully remove.
- See Also:
addInfoProvider(InfoProvider)
-
getDefaultInfo
DiscoverableInfo getDefaultInfo()
Gets the root node.- Returns:
- The root node.
-
addItemProvider
boolean addItemProvider(ItemProvider itemProvider)
Adds an item provider. Requests to this handler will return items returned by the provider if appropriate.- Parameters:
itemProvider
- The item provider.- Returns:
- If the provider could be added.
- See Also:
removeItemProvider(ItemProvider)
-
removeItemProvider
boolean removeItemProvider(ItemProvider itemProvider)
Removes an item provider.- Parameters:
itemProvider
- The item provider.- Returns:
- If the provider could be removed .
- See Also:
addItemProvider(ItemProvider)
-
-