|
Smack | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jivesoftware.smackx.entitycaps.EntityCapsManager
public class EntityCapsManager
Keeps track of entity capabilities.
| Nested Class Summary | |
|---|---|
static class |
EntityCapsManager.NodeVerHash
|
| Field Summary | |
|---|---|
protected static java.util.Map<java.lang.String,DiscoverInfo> |
caps
Map of (node + '#" + hash algorithm) to DiscoverInfo data |
static java.lang.String |
ELEMENT
|
protected static java.util.Map<java.lang.String,EntityCapsManager.NodeVerHash> |
jidCaps
Map of Full JID -> DiscoverInfo/null. |
static java.lang.String |
NAMESPACE
|
protected static EntityCapsPersistentCache |
persistentCache
|
| Method Summary | |
|---|---|
static void |
addDiscoverInfoByNode(java.lang.String nodeVer,
DiscoverInfo info)
Add DiscoverInfo to the database. |
boolean |
areEntityCapsSupported(java.lang.String 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 |
void |
disableEntityCaps()
|
void |
enableEntityCaps()
|
boolean |
entityCapsEnabled()
|
protected static java.lang.String |
generateVerificationString(DiscoverInfo discoverInfo,
java.lang.String hash)
Generates a XEP-115 Verification String |
java.lang.String |
getCapsVersion()
Get our own caps version. |
static DiscoverInfo |
getDiscoverInfoByUser(java.lang.String 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(Connection connection)
|
java.lang.String |
getLocalNodeVer()
Returns the local entity's NodeVer (e.g. |
static EntityCapsManager.NodeVerHash |
getNodeVerHashByJid(java.lang.String jid)
|
static java.lang.String |
getNodeVersionByJid(java.lang.String jid)
Get the Node version (node#ver) of a JID. |
void |
removeUserCapsNode(java.lang.String user)
Remove a record telling what entity caps node a user has. |
static void |
setCapsMaxCacheSize(int maxCacheSize)
Sets the maximum Cache size for the nodeVer to DiscoverInfo Cache |
static void |
setJidCapsMaxCacheSize(int maxCacheSize)
Sets the maximum Cache size for the JID to nodeVer Cache |
static void |
setPersistentCache(EntityCapsPersistentCache cache)
Set the persistent cache implementation |
void |
updateLocalEntityCaps()
Updates the local user Entity Caps information with the data provided If we are connected and there was already a presence send, another presence is send to inform others about your new Entity Caps node string. |
static boolean |
verifyDiscoverInfoVersion(java.lang.String ver,
java.lang.String hash,
DiscoverInfo info)
Verify DisoverInfo and Caps Node as defined in XEP-0115 5.4 Processing Method |
protected static boolean |
verifyPacketExtensions(DiscoverInfo info)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String NAMESPACE
public static final java.lang.String ELEMENT
protected static EntityCapsPersistentCache persistentCache
protected static java.util.Map<java.lang.String,DiscoverInfo> caps
protected static java.util.Map<java.lang.String,EntityCapsManager.NodeVerHash> jidCaps
| Method Detail |
|---|
public static void addDiscoverInfoByNode(java.lang.String nodeVer,
DiscoverInfo info)
nodeVer - The node and verification String (e.g.
"http://psi-im.org#q07IKJEyjvHSyhy//CH0CxmKi8w=").info - DiscoverInfo for the specified node.public static java.lang.String getNodeVersionByJid(java.lang.String jid)
user - the user (Full JID)
public static EntityCapsManager.NodeVerHash getNodeVerHashByJid(java.lang.String jid)
public static DiscoverInfo getDiscoverInfoByUser(java.lang.String user)
user - user name (Full JID)
public static DiscoverInfo getDiscoveryInfoByNodeVer(java.lang.String nodeVer)
nodeVer - The node name (e.g.
"http://psi-im.org#q07IKJEyjvHSyhy//CH0CxmKi8w=").
public static void setPersistentCache(EntityCapsPersistentCache cache)
throws java.io.IOException
cache -
java.io.IOExceptionpublic static void setJidCapsMaxCacheSize(int maxCacheSize)
maxCacheSize - public static void setCapsMaxCacheSize(int maxCacheSize)
maxCacheSize - public static EntityCapsManager getInstanceFor(Connection connection)
public void enableEntityCaps()
public void disableEntityCaps()
public boolean entityCapsEnabled()
public void removeUserCapsNode(java.lang.String user)
user - the user (Full JID)public java.lang.String getCapsVersion()
public java.lang.String getLocalNodeVer()
public boolean areEntityCapsSupported(java.lang.String jid)
jid -
public boolean areEntityCapsSupportedByServer()
public void updateLocalEntityCaps()
discoverInfo - the local users discover info (mostly the service discovery
features)identityType - the local users identity typeidentityName - the local users identity nameextendedInfo - the local users extended info
public static boolean verifyDiscoverInfoVersion(java.lang.String ver,
java.lang.String hash,
DiscoverInfo info)
capsNode - the caps node (i.e. node#ver)info -
protected static boolean verifyPacketExtensions(DiscoverInfo info)
info -
protected static java.lang.String generateVerificationString(DiscoverInfo discoverInfo,
java.lang.String hash)
discoverInfo - hash - the used hash function
|
Smack | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||