E - public class DefaultClusteringStrategyAbstract<E extends ConnectionRecordIfc> extends Object implements ClusteringStrategyIfc<E>
| Modifier and Type | Field and Description |
|---|---|
protected CopyOnWriteArrayList<tigase.xmpp.JID> |
cl_nodes_list
Field description
|
protected ClusterControllerIfc |
cluster
Field description
|
protected SessionManagerClusteredIfc |
sm
Field description
|
| Constructor and Description |
|---|
DefaultClusteringStrategyAbstract()
Constructs ...
|
| Modifier and Type | Method and Description |
|---|---|
void |
addCommandListener(CommandListener cmd)
Method description
|
boolean |
containsJid(tigase.xmpp.BareJID jid)
Method description
|
List<tigase.xmpp.JID> |
getAllNodes()
Method description
|
tigase.xmpp.JID[] |
getConnectionIdsForJid(tigase.xmpp.BareJID jid)
Method description
|
E |
getConnectionRecord(tigase.xmpp.JID jid)
Method description
|
E |
getConnectionRecordInstance()
Method description
|
Set<E> |
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> |
getNodesForPacketForward(tigase.xmpp.JID fromNode,
Set<tigase.xmpp.JID> visitedNodes,
Packet packet)
Method description
|
void |
getStatistics(StatisticsList list)
Method description
|
void |
handleLocalPacket(Packet packet,
XMPPResourceConnection conn)
Method description
|
void |
handleLocalPresenceSet(XMPPResourceConnection conn)
Method description
|
void |
handleLocalResourceBind(XMPPResourceConnection conn)
Method description
|
void |
handleLocalUserLogin(tigase.xmpp.BareJID userId,
XMPPResourceConnection conn)
Method description
|
void |
handleLocalUserLogout(tigase.xmpp.BareJID userId,
XMPPResourceConnection conn)
Method description
|
boolean |
hasCompleteJidsInfo()
Method description
|
protected boolean |
isSuitableForForward(Packet packet)
Method description
|
void |
nodeConnected(tigase.xmpp.JID jid)
Method description
|
void |
nodeDisconnected(tigase.xmpp.JID jid)
Method description
|
boolean |
processPacket(Packet packet,
XMPPResourceConnection conn)
Method description
|
boolean |
sendToNextNode(tigase.xmpp.JID fromNode,
Set<tigase.xmpp.JID> visitedNodes,
Map<String,String> data,
Packet packet)
Method attempts to send the packet to the next cluster node.
|
void |
setClusterController(ClusterControllerIfc clComp)
Method description
|
void |
setProperties(Map<String,Object> props)
Method description
|
void |
setSessionManagerHandler(SessionManagerClusteredIfc sm)
Method description
|
String |
toString()
Method description
|
protected ClusterControllerIfc cluster
protected SessionManagerClusteredIfc sm
protected CopyOnWriteArrayList<tigase.xmpp.JID> cl_nodes_list
public DefaultClusteringStrategyAbstract()
public final void addCommandListener(CommandListener cmd)
cmd - public boolean containsJid(tigase.xmpp.BareJID jid)
containsJid in interface OnlineJidsReporterjid - booleanpublic void handleLocalPacket(Packet packet, XMPPResourceConnection conn)
handleLocalPacket in interface ClusteringStrategyIfc<E extends ConnectionRecordIfc>packet - conn - public void handleLocalPresenceSet(XMPPResourceConnection conn)
handleLocalPresenceSet in interface ClusteringStrategyIfc<E extends ConnectionRecordIfc>conn - public void handleLocalResourceBind(XMPPResourceConnection conn)
handleLocalResourceBind in interface ClusteringStrategyIfc<E extends ConnectionRecordIfc>conn - public void handleLocalUserLogin(tigase.xmpp.BareJID userId,
XMPPResourceConnection conn)
handleLocalUserLogin in interface ClusteringStrategyIfc<E extends ConnectionRecordIfc>userId - conn - public void handleLocalUserLogout(tigase.xmpp.BareJID userId,
XMPPResourceConnection conn)
handleLocalUserLogout in interface ClusteringStrategyIfc<E extends ConnectionRecordIfc>userId - conn - public void nodeConnected(tigase.xmpp.JID jid)
nodeConnected in interface ClusteringStrategyIfc<E extends ConnectionRecordIfc>jid - public void nodeDisconnected(tigase.xmpp.JID jid)
nodeDisconnected in interface ClusteringStrategyIfc<E extends ConnectionRecordIfc>jid - public boolean processPacket(Packet packet, XMPPResourceConnection conn)
processPacket in interface ClusteringStrategyIfc<E extends ConnectionRecordIfc>packet - conn - booleanpublic boolean sendToNextNode(tigase.xmpp.JID fromNode,
Set<tigase.xmpp.JID> visitedNodes,
Map<String,String> data,
Packet packet)
fromNode - data - packet - to be sent to a next cluster nodevisitedNodes - a list of nodes already visited by the packet.public String toString()
public List<tigase.xmpp.JID> getAllNodes()
getAllNodes in interface ClusteringStrategyIfc<E extends ConnectionRecordIfc>Listpublic tigase.xmpp.JID[] getConnectionIdsForJid(tigase.xmpp.BareJID jid)
getConnectionIdsForJid in interface OnlineJidsReporterjid - JID[]public E getConnectionRecord(tigase.xmpp.JID jid)
getConnectionRecord in interface ClusteringStrategyIfc<E extends ConnectionRecordIfc>jid - Epublic E getConnectionRecordInstance()
getConnectionRecordInstance in interface ClusteringStrategyIfc<E extends ConnectionRecordIfc>Epublic Set<E> getConnectionRecords(tigase.xmpp.BareJID bareJID)
getConnectionRecords in interface ClusteringStrategyIfc<E extends ConnectionRecordIfc>bareJID - Setpublic Map<String,Object> getDefaults(Map<String,Object> params)
getDefaults in interface ClusteringStrategyIfc<E extends ConnectionRecordIfc>params - Mappublic String getInfo()
getInfo in interface ClusteringStrategyIfc<E extends ConnectionRecordIfc>String@Deprecated public Object getInternalCacheData()
getInternalCacheData in interface ClusteringStrategyIfc<E extends ConnectionRecordIfc>Objectpublic List<tigase.xmpp.JID> getNodesForPacketForward(tigase.xmpp.JID fromNode, Set<tigase.xmpp.JID> visitedNodes, Packet packet)
fromNode - visitedNodes - packet - Listpublic void getStatistics(StatisticsList list)
getStatistics in interface ClusteringStrategyIfc<E extends ConnectionRecordIfc>list - public boolean hasCompleteJidsInfo()
hasCompleteJidsInfo in interface OnlineJidsReporterbooleanpublic void setClusterController(ClusterControllerIfc clComp)
setClusterController in interface ClusteringStrategyIfc<E extends ConnectionRecordIfc>clComp - public void setProperties(Map<String,Object> props)
setProperties in interface ClusteringStrategyIfc<E extends ConnectionRecordIfc>props - public void setSessionManagerHandler(SessionManagerClusteredIfc sm)
setSessionManagerHandler in interface ClusteringStrategyIfc<E extends ConnectionRecordIfc>sm - protected boolean isSuitableForForward(Packet packet)
packet - booleanCopyright © 2014 "Tigase, Inc.". All rights reserved.