public class OnlineUsersCachingStrategy extends tigase.cluster.strategy.DefaultClusteringStrategyAbstract<ConnectionRecordExt>
| Modifier and Type | Field and Description |
|---|---|
protected static tigase.licence.LicenceChecker |
licenceChecker |
static String |
ONLINE_PRESENCE_CACHE_PROP_KEY
Field description
|
static String |
REQUEST_SYNCONLINE_CMD
Field description
|
static String |
RESPOND_SYNCONLINE_CMD
Field description
|
static String |
STRATEGY_STATS_CMD
Field description
|
static String |
USER_CONNECTED_CMD
Field description
|
static String |
USER_DISCONNECTED_CMD
Field description
|
static String |
USER_PRESENCE_CMD
Field description
|
| Constructor and Description |
|---|
OnlineUsersCachingStrategy()
Constructs ...
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsJid(tigase.xmpp.BareJID jid)
Method description
|
List<tigase.xmpp.JID> |
getAllNodes()
Method description
|
tigase.cluster.api.ClusterControllerIfc |
getCluster()
Method description
|
tigase.xmpp.JID[] |
getConnectionIdsForJid(tigase.xmpp.BareJID jid)
Method description
|
ConnectionRecordExt |
getConnectionRecord(tigase.xmpp.JID jid)
Method description
|
ConnectionRecordExt |
getConnectionRecordInstance()
Method description
|
Set<ConnectionRecordExt> |
getConnectionRecords(tigase.xmpp.BareJID bareJID)
Method description
|
Map<String,Object> |
getDefaults(Map<String,Object> params)
Method description
|
String |
getInfo()
Method description
|
Object |
getInternalCacheData()
Deprecated.
|
List<tigase.xmpp.JID> |
getNodesForJid(tigase.xmpp.JID jid)
Method description
|
List<tigase.xmpp.JID> |
getNodesForPacketForward(tigase.xmpp.JID fromNode,
Set<tigase.xmpp.JID> visitedNodes,
tigase.server.Packet packet)
Method description
|
List<tigase.xmpp.JID> |
getNodesForUserConnect(tigase.xmpp.JID jid)
Method description
|
List<tigase.xmpp.JID> |
getNodesForUserDisconnect(tigase.xmpp.JID jid)
Method description
|
tigase.cluster.api.SessionManagerClusteredIfc |
getSM()
Method description
|
void |
getStatistics(tigase.stats.StatisticsList list)
Method description
|
void |
handleLocalPacket(tigase.server.Packet packet,
tigase.xmpp.XMPPResourceConnection conn)
Method description
|
void |
handleLocalResourceBind(tigase.xmpp.XMPPResourceConnection conn)
Method description
|
void |
handleLocalUserLogout(tigase.xmpp.BareJID userId,
tigase.xmpp.XMPPResourceConnection conn)
Method description
|
boolean |
hasCompleteJidsInfo()
Method description
|
void |
nodeConnected(tigase.xmpp.JID node)
Method description
|
void |
nodeDisconnected(tigase.xmpp.JID node)
Method description
|
protected Map<String,String> |
prepareConnectionParams(tigase.xmpp.XMPPResourceConnection conn)
A utility method used to prepare a Map of data with user session data
before it can be sent over to another cluster node.
|
protected boolean |
presenceStatusUpdate(tigase.server.Packet packet)
Method description
|
void |
presenceUpdate(tigase.xml.Element presence,
ConnectionRecordExt rec)
Method description
|
protected void |
requestSync(tigase.xmpp.JID node)
Send synchronization request to a given cluster node.
|
void |
setProperties(Map<String,Object> props)
Method description
|
String |
toString()
Method description
|
void |
userDisconnected(ConnectionRecordExt rec)
Method description
|
void |
usersConnected(ConnectionRecordExt... recs)
Method description
|
public static final String ONLINE_PRESENCE_CACHE_PROP_KEY
public static final String REQUEST_SYNCONLINE_CMD
public static final String RESPOND_SYNCONLINE_CMD
public static final String STRATEGY_STATS_CMD
public static final String USER_CONNECTED_CMD
public static final String USER_DISCONNECTED_CMD
public static final String USER_PRESENCE_CMD
protected static tigase.licence.LicenceChecker licenceChecker
public boolean containsJid(tigase.xmpp.BareJID jid)
containsJid in interface tigase.sys.OnlineJidsReportercontainsJid in class tigase.cluster.strategy.DefaultClusteringStrategyAbstract<ConnectionRecordExt>jid - booleanpublic void handleLocalPacket(tigase.server.Packet packet,
tigase.xmpp.XMPPResourceConnection conn)
handleLocalPacket in interface tigase.cluster.strategy.ClusteringStrategyIfc<ConnectionRecordExt>handleLocalPacket in class tigase.cluster.strategy.DefaultClusteringStrategyAbstract<ConnectionRecordExt>packet - conn - public void handleLocalUserLogout(tigase.xmpp.BareJID userId,
tigase.xmpp.XMPPResourceConnection conn)
handleLocalUserLogout in interface tigase.cluster.strategy.ClusteringStrategyIfc<ConnectionRecordExt>handleLocalUserLogout in class tigase.cluster.strategy.DefaultClusteringStrategyAbstract<ConnectionRecordExt>userId - conn - public void handleLocalResourceBind(tigase.xmpp.XMPPResourceConnection conn)
handleLocalResourceBind in interface tigase.cluster.strategy.ClusteringStrategyIfc<ConnectionRecordExt>handleLocalResourceBind in class tigase.cluster.strategy.DefaultClusteringStrategyAbstract<ConnectionRecordExt>conn - public void nodeConnected(tigase.xmpp.JID node)
nodeConnected in interface tigase.cluster.strategy.ClusteringStrategyIfc<ConnectionRecordExt>nodeConnected in class tigase.cluster.strategy.DefaultClusteringStrategyAbstract<ConnectionRecordExt>node - public void nodeDisconnected(tigase.xmpp.JID node)
nodeDisconnected in interface tigase.cluster.strategy.ClusteringStrategyIfc<ConnectionRecordExt>nodeDisconnected in class tigase.cluster.strategy.DefaultClusteringStrategyAbstract<ConnectionRecordExt>node - public void presenceUpdate(tigase.xml.Element presence,
ConnectionRecordExt rec)
presence - rec - public String toString()
toString in class tigase.cluster.strategy.DefaultClusteringStrategyAbstract<ConnectionRecordExt>Stringpublic void userDisconnected(ConnectionRecordExt rec)
rec - public void usersConnected(ConnectionRecordExt... recs)
recs - public List<tigase.xmpp.JID> getAllNodes()
getAllNodes in interface tigase.cluster.strategy.ClusteringStrategyIfc<ConnectionRecordExt>getAllNodes in class tigase.cluster.strategy.DefaultClusteringStrategyAbstract<ConnectionRecordExt>Listpublic tigase.cluster.api.ClusterControllerIfc getCluster()
ClusterControllerIfcpublic tigase.xmpp.JID[] getConnectionIdsForJid(tigase.xmpp.BareJID jid)
getConnectionIdsForJid in interface tigase.sys.OnlineJidsReportergetConnectionIdsForJid in class tigase.cluster.strategy.DefaultClusteringStrategyAbstract<ConnectionRecordExt>jid - JID[]public ConnectionRecordExt getConnectionRecord(tigase.xmpp.JID jid)
getConnectionRecord in interface tigase.cluster.strategy.ClusteringStrategyIfc<ConnectionRecordExt>getConnectionRecord in class tigase.cluster.strategy.DefaultClusteringStrategyAbstract<ConnectionRecordExt>jid - ConnectionRecordExtpublic ConnectionRecordExt getConnectionRecordInstance()
getConnectionRecordInstance in interface tigase.cluster.strategy.ClusteringStrategyIfc<ConnectionRecordExt>getConnectionRecordInstance in class tigase.cluster.strategy.DefaultClusteringStrategyAbstract<ConnectionRecordExt>Epublic Set<ConnectionRecordExt> getConnectionRecords(tigase.xmpp.BareJID bareJID)
getConnectionRecords in interface tigase.cluster.strategy.ClusteringStrategyIfc<ConnectionRecordExt>getConnectionRecords in class tigase.cluster.strategy.DefaultClusteringStrategyAbstract<ConnectionRecordExt>bareJID - Setpublic Map<String,Object> getDefaults(Map<String,Object> params)
getDefaults in interface tigase.cluster.strategy.ClusteringStrategyIfc<ConnectionRecordExt>getDefaults in class tigase.cluster.strategy.DefaultClusteringStrategyAbstract<ConnectionRecordExt>params - Mappublic String getInfo()
getInfo in interface tigase.cluster.strategy.ClusteringStrategyIfc<ConnectionRecordExt>getInfo in class tigase.cluster.strategy.DefaultClusteringStrategyAbstract<ConnectionRecordExt>String@Deprecated public Object getInternalCacheData()
getInternalCacheData in interface tigase.cluster.strategy.ClusteringStrategyIfc<ConnectionRecordExt>getInternalCacheData in class tigase.cluster.strategy.DefaultClusteringStrategyAbstract<ConnectionRecordExt>Objectpublic List<tigase.xmpp.JID> getNodesForJid(tigase.xmpp.JID jid)
jid - Listpublic List<tigase.xmpp.JID> getNodesForPacketForward(tigase.xmpp.JID fromNode, Set<tigase.xmpp.JID> visitedNodes, tigase.server.Packet packet)
getNodesForPacketForward in class tigase.cluster.strategy.DefaultClusteringStrategyAbstract<ConnectionRecordExt>fromNode - visitedNodes - packet - Listpublic List<tigase.xmpp.JID> getNodesForUserConnect(tigase.xmpp.JID jid)
jid - Listpublic List<tigase.xmpp.JID> getNodesForUserDisconnect(tigase.xmpp.JID jid)
jid - Listpublic tigase.cluster.api.SessionManagerClusteredIfc getSM()
SessionManagerClusteredIfcpublic void getStatistics(tigase.stats.StatisticsList list)
getStatistics in interface tigase.cluster.strategy.ClusteringStrategyIfc<ConnectionRecordExt>getStatistics in class tigase.cluster.strategy.DefaultClusteringStrategyAbstract<ConnectionRecordExt>list - public boolean hasCompleteJidsInfo()
hasCompleteJidsInfo in interface tigase.sys.OnlineJidsReporterhasCompleteJidsInfo in class tigase.cluster.strategy.DefaultClusteringStrategyAbstract<ConnectionRecordExt>booleanpublic void setProperties(Map<String,Object> props)
setProperties in interface tigase.cluster.strategy.ClusteringStrategyIfc<ConnectionRecordExt>setProperties in class tigase.cluster.strategy.DefaultClusteringStrategyAbstract<ConnectionRecordExt>props - protected Map<String,String> prepareConnectionParams(tigase.xmpp.XMPPResourceConnection conn) throws tigase.xmpp.NotAuthorizedException, tigase.xmpp.NoConnectionIdException
conn - is user's XMPPResourceConnection for which Map structure is
prepare.
a Map structure with all user's connection essential data.Maptigase.xmpp.NoConnectionIdExceptiontigase.xmpp.NotAuthorizedExceptionprotected boolean presenceStatusUpdate(tigase.server.Packet packet)
packet - booleanprotected void requestSync(tigase.xmpp.JID node)
node - is a JID of the target cluster node.Copyright © 2014 Tigase. All rights reserved.