E - public class DefaultClusteringStrategy<E extends ConnectionRecordIfc> extends DefaultClusteringStrategyAbstract<E>
| Modifier and Type | Field and Description |
|---|---|
static String |
CONNECTION_ID
Field description
|
static String |
RESOURCE
Field description
|
static String |
SM_ID
Field description
|
static String |
USER_ID
Field description
|
static String |
XMPP_SESSION_ID
Field description
|
cluster, comp, prefix, sm| Constructor and Description |
|---|
DefaultClusteringStrategy()
Constructs ...
|
| Modifier and Type | Method and Description |
|---|---|
protected ConnectionRecordIfc |
getConnectionRecord(JID node,
Map<String,String> data)
Method takes the data received from other cluster node and creates a
ConnectionRecord with all essential connection information.
|
List<JID> |
getNodesForPacketForward(JID fromNode,
Set<JID> visitedNodes,
Packet packet)
Method description
|
void |
handleLocalPacket(Packet packet,
XMPPResourceConnection conn)
Method description
|
void |
handleLocalResourceBind(XMPPResourceConnection conn)
Method description
|
void |
handleLocalUserLogout(BareJID userId,
XMPPResourceConnection conn)
Method description
|
void |
nodeConnected(JID node)
This is a handler method which is called when a new node connects to the
cluster.
|
void |
nodeDisconnected(JID node)
This is a handler method which is called when a node disconnects from the
cluster.
|
protected Map<String,String> |
prepareConnectionParams(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.
|
addCommandListener, containsJid, containsJidLocally, containsJidLocally, everyHour, everyMinute, everySecond, getConnectionIdsForJid, getConnectionRecord, getConnectionRecordInstance, getConnectionRecords, getDefaults, getInfo, getInternalCacheData, getNodesConnected, getSM, getStatistics, getStatistics, handleLocalPresenceSet, handleLocalUserChangedConnId, handleLocalUserLogin, hasCompleteJidsInfo, isSuitableForForward, processPacket, sendToNextNode, setClusterController, setProperties, setSessionManagerHandler, setStatisticsPrefix, statisticExecutedIn, toStringpublic static final String CONNECTION_ID
public static final String RESOURCE
public static final String SM_ID
public static final String USER_ID
public static final String XMPP_SESSION_ID
public void nodeConnected(JID node)
ClusteringStrategyIfcnode - is a cluster node id.public void nodeDisconnected(JID node)
ClusteringStrategyIfcnode - is a cluster node id.public void handleLocalPacket(Packet packet, XMPPResourceConnection conn)
ClusteringStrategyIfchandleLocalPacket in interface ClusteringStrategyIfc<E extends ConnectionRecordIfc>handleLocalPacket in class DefaultClusteringStrategyAbstract<E extends ConnectionRecordIfc>public void handleLocalResourceBind(XMPPResourceConnection conn)
ClusteringStrategyIfchandleLocalResourceBind in interface ClusteringStrategyIfc<E extends ConnectionRecordIfc>handleLocalResourceBind in class DefaultClusteringStrategyAbstract<E extends ConnectionRecordIfc>public void handleLocalUserLogout(BareJID userId, XMPPResourceConnection conn)
ClusteringStrategyIfchandleLocalUserLogout in interface ClusteringStrategyIfc<E extends ConnectionRecordIfc>handleLocalUserLogout in class DefaultClusteringStrategyAbstract<E extends ConnectionRecordIfc>public List<JID> getNodesForPacketForward(JID fromNode, Set<JID> visitedNodes, Packet packet)
DefaultClusteringStrategyAbstractgetNodesForPacketForward in class DefaultClusteringStrategyAbstract<E extends ConnectionRecordIfc>List<JID>protected Map<String,String> prepareConnectionParams(XMPPResourceConnection conn) throws NotAuthorizedException, NoConnectionIdException
conn - is user's XMPPResourceConnection for which Map structure is
prepare.NoConnectionIdExceptionNotAuthorizedExceptionprotected ConnectionRecordIfc getConnectionRecord(JID node, Map<String,String> data)
node - data - Copyright © 2018 "Tigase, Inc.". All rights reserved.