|
Smack | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jivesoftware.smackx.ServiceDiscoveryManager
public class ServiceDiscoveryManager
Manages discovery of services in XMPP entities. This class provides:
Constructor Summary | |
---|---|
ServiceDiscoveryManager(XMPPConnection connection)
Creates a new ServiceDiscoveryManager for a given XMPPConnection. |
Method Summary | |
---|---|
void |
addFeature(String feature)
Registers that a new feature is supported by this XMPP entity. |
boolean |
canPublishItems(String entityID)
Returns true if the server supports publishing of items. |
DiscoverInfo |
discoverInfo(String entityID)
Returns the discovered information of a given XMPP entity addressed by its JID. |
DiscoverInfo |
discoverInfo(String entityID,
String node)
Returns the discovered information of a given XMPP entity addressed by its JID and note attribute. |
DiscoverItems |
discoverItems(String entityID)
Returns the discovered items of a given XMPP entity addressed by its JID. |
DiscoverItems |
discoverItems(String entityID,
String node)
Returns the discovered items of a given XMPP entity addressed by its JID and note attribute. |
Iterator |
getFeatures()
Returns the supported features by this XMPP entity. |
static String |
getIdentityName()
Returns the name of the client that will be returned when asked for the client identity in a disco request. |
static String |
getIdentityType()
Returns the type of client that will be returned when asked for the client identity in a disco request. |
static ServiceDiscoveryManager |
getInstanceFor(XMPPConnection connection)
Returns the ServiceDiscoveryManager instance associated with a given XMPPConnection. |
boolean |
includesFeature(String feature)
Returns true if the specified feature is registered in the ServiceDiscoveryManager. |
void |
publishItems(String entityID,
DiscoverItems discoverItems)
Publishes new items to a parent entity. |
void |
publishItems(String entityID,
String node,
DiscoverItems discoverItems)
Publishes new items to a parent entity and node. |
void |
removeFeature(String feature)
Removes the specified feature from the supported features by this XMPP entity. |
void |
removeNodeInformationProvider(String node)
Removes the NodeInformationProvider responsible for providing information (ie items) related to a given node. |
static void |
setIdentityName(String name)
Sets the name of the client that will be returned when asked for the client identity in a disco request. |
static void |
setIdentityType(String type)
Sets the type of client that will be returned when asked for the client identity in a disco request. |
void |
setNodeInformationProvider(String node,
NodeInformationProvider listener)
Sets the NodeInformationProvider responsible for providing information (ie items) related to a given node. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ServiceDiscoveryManager(XMPPConnection connection)
connection
- the connection to which a ServiceDiscoveryManager is going to be created.Method Detail |
---|
public static ServiceDiscoveryManager getInstanceFor(XMPPConnection connection)
connection
- the connection used to look for the proper ServiceDiscoveryManager.
public static String getIdentityName()
public static void setIdentityName(String name)
name
- the name of the client that will be returned when asked for the client identity
in a disco request.public static String getIdentityType()
public static void setIdentityType(String type)
type
- the type of client that will be returned when asked for the client identity in a
disco request.public void setNodeInformationProvider(String node, NodeInformationProvider listener)
In MUC, a node could be 'http://jabber.org/protocol/muc#rooms' which means that the NodeInformationProvider will provide information about the rooms where the user has joined.
node
- the node whose items will be provided by the NodeInformationProvider.listener
- the NodeInformationProvider responsible for providing items related
to the node.public void removeNodeInformationProvider(String node)
node
- the node to remove the associated NodeInformationProvider.public Iterator getFeatures()
public void addFeature(String feature)
feature
- the feature to register as supported.public void removeFeature(String feature)
feature
- the feature to remove from the supported features.public boolean includesFeature(String feature)
feature
- the feature to look for.
public DiscoverInfo discoverInfo(String entityID) throws XMPPException
entityID
- the address of the XMPP entity.
XMPPException
- if the operation failed for some reason.public DiscoverInfo discoverInfo(String entityID, String node) throws XMPPException
entityID
- the address of the XMPP entity.node
- the attribute that supplements the 'jid' attribute.
XMPPException
- if the operation failed for some reason.public DiscoverItems discoverItems(String entityID) throws XMPPException
entityID
- the address of the XMPP entity.
XMPPException
- if the operation failed for some reason.public DiscoverItems discoverItems(String entityID, String node) throws XMPPException
entityID
- the address of the XMPP entity.node
- the attribute that supplements the 'jid' attribute.
XMPPException
- if the operation failed for some reason.public boolean canPublishItems(String entityID) throws XMPPException
entityID
- the address of the XMPP entity.
XMPPException
- if the operation failed for some reason.public void publishItems(String entityID, DiscoverItems discoverItems) throws XMPPException
entityID
- the address of the XMPP entity.discoverItems
- the DiscoveryItems to publish.
XMPPException
- if the operation failed for some reason.public void publishItems(String entityID, String node, DiscoverItems discoverItems) throws XMPPException
entityID
- the address of the XMPP entity.node
- the attribute that supplements the 'jid' attribute.discoverItems
- the DiscoveryItems to publish.
XMPPException
- if the operation failed for some reason.
|
Smack | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |