|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.java.sip.communicator.impl.protocol.jabber.ScServiceDiscoveryManager
public class ScServiceDiscoveryManager
An wrapper to smack's default ServiceDiscoveryManager that adds
support for XEP-0115 - Entity Capabilities.
This work is based on Jonas Adahl's smack fork.
| Constructor Summary | |
|---|---|
ScServiceDiscoveryManager(ProtocolProviderServiceJabberImpl parentProvider,
String[] featuresToRemove,
String[] featuresToAdd)
Creates a new ScServiceDiscoveryManager wrapping the default discovery manager of the specified connection. |
|
| Method Summary | |
|---|---|
void |
addExtFeature(String ext)
Add feature to put in "ext" attribute. |
void |
addFeature(String feature)
Registers that a new feature is supported by this XMPP entity. |
org.jivesoftware.smackx.packet.DiscoverInfo |
discoverInfo(String entityID)
Returns the discovered information of a given XMPP entity addressed by its JID. |
org.jivesoftware.smackx.packet.DiscoverInfo |
discoverInfoNonBlocking(String entityID)
Returns the discovered information of a given XMPP entity addressed by its JID if locally cached, otherwise schedules for retrieval. |
org.jivesoftware.smackx.packet.DiscoverItems |
discoverItems(String entityID)
Returns the discovered items of a given XMPP entity addressed by its JID. |
org.jivesoftware.smackx.packet.DiscoverItems |
discoverItems(String entityID,
String node)
Returns the discovered items of a given XMPP entity addressed by its JID and note attribute. |
EntityCapsManager |
getCapsManager()
Gets the EntityCapsManager which handles the entity capabilities for this ScServiceDiscoveryManager. |
String |
getExtFeatures()
Get "ext" value. |
List<String> |
getFeatures()
Returns a reference to our local copy of the feature list supported by this implementation. |
List<String> |
getNodeFeatures()
Returns a list of the features defined in the node. |
List<org.jivesoftware.smackx.packet.DiscoverInfo.Identity> |
getNodeIdentities()
Returns a list of the identities defined in the node. |
List<org.jivesoftware.smackx.packet.DiscoverItems.Item> |
getNodeItems()
Returns a list of the Items DiscoverItems.Item defined in the
node or in other words null since we don't support any. |
org.jivesoftware.smackx.packet.DiscoverInfo |
getOwnDiscoverInfo()
Get a DiscoverInfo for the current entity caps node. |
boolean |
includesFeature(String feature)
Returns true if the specified feature is registered in our ServiceDiscoveryManager and false otherwise. |
void |
interceptPacket(org.jivesoftware.smack.packet.Packet packet)
Intercepts outgoing presence packets and adds entity capabilities at their ends. |
void |
removeExtFeature(String ext)
Remove "ext" feature. |
void |
removeFeature(String feature)
Removes the specified feature from the supported features by the encapsulated ServiceDiscoveryManager. |
void |
stop()
Clears/stops what's needed. |
boolean |
supportsFeature(String jid,
String feature)
Returns true if jid supports the specified feature and false otherwise. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ScServiceDiscoveryManager(ProtocolProviderServiceJabberImpl parentProvider,
String[] featuresToRemove,
String[] featuresToAdd)
parentProvider - the parent provider that creates discovery manager.featuresToRemove - an array of Strings representing the
features to be removed from the ServiceDiscoveryManager of the
specified connection which is to be wrapped by the new instancefeaturesToAdd - an array of Strings representing the
features to be added to the new instance and to the
ServiceDiscoveryManager of the specified connection
which is to be wrapped by the new instance| Method Detail |
|---|
public void addFeature(String feature)
Since no packet is actually sent to the server it is safe to perform this operation before logging to the server. In fact, you may want to configure the supported features before logging to the server so that the information is already available if it is required upon login.
feature - the feature to register as supported.public List<String> getFeatures()
public org.jivesoftware.smackx.packet.DiscoverInfo getOwnDiscoverInfo()
public boolean includesFeature(String feature)
ServiceDiscoveryManager and false otherwise.
feature - the feature to look for.
public void removeFeature(String feature)
Since no packet is actually sent to the server it is safe to perform this operation before logging to the server.
feature - the feature to remove from the supported features.public void addExtFeature(String ext)
ext - ext feature to addpublic void removeExtFeature(String ext)
ext - ext feature to removepublic String getExtFeatures()
public void interceptPacket(org.jivesoftware.smack.packet.Packet packet)
interceptPacket in interface org.jivesoftware.smack.PacketInterceptorpacket - the (hopefully presence) packet we need to add a "c"
element to.public List<org.jivesoftware.smackx.packet.DiscoverItems.Item> getNodeItems()
DiscoverItems.Item defined in the
node or in other words null since we don't support any.
getNodeItems in interface org.jivesoftware.smackx.NodeInformationProviderpublic List<String> getNodeFeatures()
getNodeFeatures in interface org.jivesoftware.smackx.NodeInformationProviderpublic List<org.jivesoftware.smackx.packet.DiscoverInfo.Identity> getNodeIdentities()
getNodeIdentities in interface org.jivesoftware.smackx.NodeInformationProvider
public org.jivesoftware.smackx.packet.DiscoverInfo discoverInfo(String entityID)
throws org.jivesoftware.smack.XMPPException
entityID - the address of the XMPP entity.
org.jivesoftware.smack.XMPPException - if the operation failed for some reason.
public org.jivesoftware.smackx.packet.DiscoverInfo discoverInfoNonBlocking(String entityID)
throws org.jivesoftware.smack.XMPPException
entityID - the address of the XMPP entity.
org.jivesoftware.smack.XMPPException - if the operation failed for some reason.
public org.jivesoftware.smackx.packet.DiscoverItems discoverItems(String entityID)
throws org.jivesoftware.smack.XMPPException
entityID - the address of the XMPP entity.
org.jivesoftware.smack.XMPPException - if the operation failed for some reason.
public org.jivesoftware.smackx.packet.DiscoverItems discoverItems(String entityID,
String node)
throws org.jivesoftware.smack.XMPPException
entityID - the address of the XMPP entity.node - the attribute that supplements the 'jid' attribute.
org.jivesoftware.smack.XMPPException - if the operation failed for some reason.
public boolean supportsFeature(String jid,
String feature)
jid - the jabber ID we'd like to test for supportfeature - the URN feature we are interested in
public EntityCapsManager getCapsManager()
public void stop()
|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||