public final class EntityCapsManager
extends org.jivesoftware.smack.Manager
| Modifier and Type | Class and Description |
|---|---|
static class |
EntityCapsManager.NodeVerHash |
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ELEMENT |
static java.lang.String |
NAMESPACE |
protected static EntityCapsPersistentCache |
persistentCache |
| Modifier and Type | Method and Description |
|---|---|
boolean |
areEntityCapsSupported(org.jxmpp.jid.Jid jid)
Returns true if Entity Caps are supported by a given JID.
|
boolean |
areEntityCapsSupportedByServer()
Returns true if Entity Caps are supported by the local service/server.
|
static void |
clearMemoryCache()
Clears the memory cache.
|
void |
disableEntityCaps() |
void |
enableEntityCaps() |
boolean |
entityCapsEnabled() |
protected static CapsVersionAndHash |
generateVerificationString(DiscoverInfoView discoverInfo) |
protected static CapsVersionAndHash |
generateVerificationString(DiscoverInfoView discoverInfo,
java.lang.String hash)
Generates a XEP-115 Verification String
|
CapsVersionAndHash |
getCapsVersionAndHash()
Get our own caps version or
null if none is yet set. |
static DiscoverInfo |
getDiscoverInfoByUser(org.jxmpp.jid.Jid user)
Get the discover info given a user name.
|
static DiscoverInfo |
getDiscoveryInfoByNodeVer(java.lang.String nodeVer)
Retrieve DiscoverInfo for a specific node.
|
static EntityCapsManager |
getInstanceFor(org.jivesoftware.smack.XMPPConnection connection) |
java.lang.String |
getLocalNodeVer()
Returns the local entity's NodeVer (e.g.
|
static EntityCapsManager.NodeVerHash |
getNodeVerHashByJid(org.jxmpp.jid.Jid jid) |
static java.lang.String |
getNodeVersionByJid(org.jxmpp.jid.Jid jid)
Get the Node version (node#ver) of a JID.
|
static void |
removeUserCapsNode(org.jxmpp.jid.Jid user)
Remove a record telling what entity caps node a user has.
|
static void |
setDefaultEntityNode(java.lang.String entityNode)
Set the default entity node that will be used for new EntityCapsManagers.
|
static void |
setMaxsCacheSizes(int maxJidToNodeVerSize,
int maxCapsCacheSize)
Sets the maximum cache sizes.
|
static void |
setPersistentCache(EntityCapsPersistentCache cache)
Set the persistent cache implementation.
|
static boolean |
verifyDiscoverInfoVersion(java.lang.String ver,
java.lang.String hash,
DiscoverInfo info)
Verify DiscoverInfo and Caps Node as defined in XEP-0115 5.4 Processing
Method.
|
public static final java.lang.String NAMESPACE
public static final java.lang.String ELEMENT
protected static EntityCapsPersistentCache persistentCache
public static void setDefaultEntityNode(java.lang.String entityNode)
entityNode - TODO javadoc me pleasepublic static java.lang.String getNodeVersionByJid(org.jxmpp.jid.Jid jid)
jid - TODO javadoc me please
the user (Full JID)public static EntityCapsManager.NodeVerHash getNodeVerHashByJid(org.jxmpp.jid.Jid jid)
public static DiscoverInfo getDiscoverInfoByUser(org.jxmpp.jid.Jid user)
user - TODO javadoc me please
user name (Full JID)public static DiscoverInfo getDiscoveryInfoByNodeVer(java.lang.String nodeVer)
nodeVer - TODO javadoc me please
The node name (e.g.
"http://psi-im.org#q07IKJEyjvHSyhy//CH0CxmKi8w=").public static void setPersistentCache(EntityCapsPersistentCache cache)
cache - TODO javadoc me pleasepublic static void setMaxsCacheSizes(int maxJidToNodeVerSize,
int maxCapsCacheSize)
maxJidToNodeVerSize - TODO javadoc me pleasemaxCapsCacheSize - TODO javadoc me pleasepublic static void clearMemoryCache()
public static EntityCapsManager getInstanceFor(org.jivesoftware.smack.XMPPConnection connection)
public void enableEntityCaps()
public void disableEntityCaps()
public boolean entityCapsEnabled()
public static void removeUserCapsNode(org.jxmpp.jid.Jid user)
user - TODO javadoc me please
the user (Full JID)public CapsVersionAndHash getCapsVersionAndHash()
null if none is yet set. The version depends on the enabled features.
A caps version looks like '66/0NaeaBKkwk85efJTGmU47vXI='null.public java.lang.String getLocalNodeVer()
public boolean areEntityCapsSupported(org.jxmpp.jid.Jid jid)
throws org.jivesoftware.smack.SmackException.NoResponseException,
org.jivesoftware.smack.XMPPException.XMPPErrorException,
org.jivesoftware.smack.SmackException.NotConnectedException,
java.lang.InterruptedException
jid - TODO javadoc me pleaseorg.jivesoftware.smack.XMPPException.XMPPErrorException - if there was an XMPP error returned.org.jivesoftware.smack.SmackException.NoResponseException - if there was no response from the remote entity.org.jivesoftware.smack.SmackException.NotConnectedException - if the XMPP connection is not connected.java.lang.InterruptedException - if the calling thread was interrupted.public boolean areEntityCapsSupportedByServer()
throws org.jivesoftware.smack.SmackException.NoResponseException,
org.jivesoftware.smack.XMPPException.XMPPErrorException,
org.jivesoftware.smack.SmackException.NotConnectedException,
java.lang.InterruptedException
org.jivesoftware.smack.XMPPException.XMPPErrorException - if there was an XMPP error returned.org.jivesoftware.smack.SmackException.NoResponseException - if there was no response from the remote entity.org.jivesoftware.smack.SmackException.NotConnectedException - if the XMPP connection is not connected.java.lang.InterruptedException - if the calling thread was interrupted.public static boolean verifyDiscoverInfoVersion(java.lang.String ver,
java.lang.String hash,
DiscoverInfo info)
ver - TODO javadoc me pleasehash - TODO javadoc me pleaseinfo - TODO javadoc me pleaseprotected static CapsVersionAndHash generateVerificationString(DiscoverInfoView discoverInfo)
protected static CapsVersionAndHash generateVerificationString(DiscoverInfoView discoverInfo, java.lang.String hash)
discoverInfo - TODO javadoc me pleasehash - TODO javadoc me please
the used hash function, if null, default hash will be used