@Bean(name="strategy", parent=SessionManagerClustered.class, active=true) public class DefaultClusteringStrategy<E extends ConnectionRecordIfc> extends DefaultClusteringStrategyAbstract<E>
Modifier and Type | Field and Description |
---|---|
static String |
CONNECTION_ID |
static String |
RESOURCE |
static String |
SM_ID |
static String |
USER_ID |
static String |
XMPP_SESSION_ID |
Constructor and Description |
---|
DefaultClusteringStrategy() |
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) |
void |
handleLocalPacket(Packet packet,
XMPPResourceConnection conn) |
void |
handleLocalResourceBind(XMPPResourceConnection conn) |
void |
handleLocalUserLogout(BareJID userId,
XMPPResourceConnection conn) |
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, fireEvent, getConnectionIdsForJid, getConnectionRecord, getConnectionRecordInstance, getConnectionRecords, getDefaults, getInfo, getNodesConnected, getNodesForIqResponse, getSM, getStatistics, getStatistics, handleLocalPresenceSet, handleLocalUserChangedConnId, handleLocalUserLogin, hasCompleteJidsInfo, isIqResponseToNode, isSuitableForForward, nodeConnected, nodeDisconnected, processPacket, sendToNextNode, setClusterController, setProperties, setStatisticsPrefix, statisticExecutedIn, toString
public 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 handleLocalPacket(Packet packet, XMPPResourceConnection conn)
handleLocalPacket
in interface ClusteringStrategyIfc<E extends ConnectionRecordIfc>
handleLocalPacket
in class DefaultClusteringStrategyAbstract<E extends ConnectionRecordIfc>
public void handleLocalResourceBind(XMPPResourceConnection conn)
handleLocalResourceBind
in interface ClusteringStrategyIfc<E extends ConnectionRecordIfc>
handleLocalResourceBind
in class DefaultClusteringStrategyAbstract<E extends ConnectionRecordIfc>
public void handleLocalUserLogout(BareJID userId, XMPPResourceConnection conn)
handleLocalUserLogout
in interface ClusteringStrategyIfc<E extends ConnectionRecordIfc>
handleLocalUserLogout
in class DefaultClusteringStrategyAbstract<E extends ConnectionRecordIfc>
public List<JID> getNodesForPacketForward(JID fromNode, Set<JID> visitedNodes, Packet packet)
getNodesForPacketForward
in class DefaultClusteringStrategyAbstract<E extends ConnectionRecordIfc>
protected Map<String,String> prepareConnectionParams(XMPPResourceConnection conn) throws NotAuthorizedException, NoConnectionIdException
conn
- is user's XMPPResourceConnection for which Map structure is prepare.NotAuthorizedException
NoConnectionIdException
protected ConnectionRecordIfc getConnectionRecord(JID node, Map<String,String> data)
Copyright © 2004–2021 "Tigase, Inc.". All rights reserved.