|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecttigase.server.BasicComponent
tigase.server.AbstractMessageReceiver
tigase.server.xmppsession.SessionManager
tigase.cluster.SessionManagerClustered
public class SessionManagerClustered
Class SessionManagerClusteredOld Created: Tue Nov 22 07:07:11 2005
| Field Summary | |
|---|---|
static String |
CLUSTER_STRATEGY_VAR
|
static String |
CONNECTION_ID
Field description |
static String |
MY_DOMAIN_NAME_PROP_KEY
Field description |
static String |
RESOURCE
Field description |
static String |
SM_ID
Field description |
static String |
STRATEGY_CLASS_PROP_KEY
Field description |
static String |
STRATEGY_CLASS_PROP_VAL
Field description |
static String |
STRATEGY_CLASS_PROPERTY
Field description |
static int |
SYNC_MAX_BATCH_SIZE
Field description |
static String |
USER_ID
Field description |
static String |
XMPP_SESSION_ID
Field description |
| Fields inherited from class tigase.server.xmppsession.SessionManager |
|---|
ADMIN_COMMAND_NODE, connectionsByFrom |
| Fields inherited from class tigase.server.AbstractMessageReceiver |
|---|
HOUR, INCOMING_FILTERS_PROP_KEY, INCOMING_FILTERS_PROP_VAL, MAX_QUEUE_SIZE_PROP_KEY, MAX_QUEUE_SIZE_PROP_VAL, maxInQueueSize, maxOutQueueSize, MINUTE, OUTGOING_FILTERS_PROP_KEY, OUTGOING_FILTERS_PROP_VAL, SECOND |
| Fields inherited from class tigase.server.BasicComponent |
|---|
admins, ALL_PROP_KEY, COMMAND_PROP_NODE, scriptCommands, SCRIPTS_DIR_PROP_DEF, SCRIPTS_DIR_PROP_KEY, vHostManager |
| Fields inherited from interface tigase.server.xmppsession.SessionManagerHandler |
|---|
COMMIT_HANDLER_KEY |
| Fields inherited from interface tigase.disco.XMPPService |
|---|
CMD_FEATURES, DEF_FEATURES, INFO_XMLNS, ITEMS_XMLNS |
| Constructor Summary | |
|---|---|
SessionManagerClustered()
|
|
| Method Summary | |
|---|---|
protected void |
closeSession(XMPPResourceConnection conn,
boolean closeOnly)
The method intercept user's disconnect event. |
boolean |
containsJid(tigase.xmpp.BareJID jid)
The method checks whether the given JID is known to the installation, either user connected to local machine or any of the cluster nodes. |
tigase.xmpp.JID[] |
getConnectionIdsForJid(tigase.xmpp.BareJID jid)
If the installation knows about user's JID, that he is connected to the system, then this method returns all user's connection IDs. |
protected ConnectionRecord |
getConnectionRecord(tigase.xmpp.JID node,
Map<String,String> data)
Method takes the data received from other cluster node and creates a ConnectionRecord with all essential connection information. |
Map<String,Object> |
getDefaults(Map<String,Object> params)
Loads the component's default configuration to the configuration management subsystem. |
void |
getStatistics(StatisticsList list)
Method generates and returns component's statistics. |
ClusteringStrategyIfc |
getStrategy()
Returns active clustering strategy object. |
void |
handlePresenceSet(XMPPResourceConnection conn)
Method intercepts presence set event generated by presence status received from a user connected to this node. |
void |
handleResourceBind(XMPPResourceConnection conn)
Method intercepts resource bind event generated for on user's connection. |
boolean |
hasCompleteJidsInfo()
Method checks whether the clustering strategy has a complete JIDs info. |
void |
initBindings(Bindings binds)
Method description |
void |
nodeConnected(String node)
The method is called on cluster node connection event. |
void |
nodeDisconnected(String node)
Method is called on cluster node disconnection event. |
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. |
int |
processingInThreads()
Concurrency control method. |
int |
processingOutThreads()
Concurrency control method. |
void |
processPacket(Packet packet)
This is a standard component method for processing packets. |
protected void |
requestSync(tigase.xmpp.JID node)
Send synchronization request to a given cluster node. |
protected 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 cl_controller)
Set's the configures the cluster controller object for cluster communication and API. |
void |
setProperties(Map<String,Object> props)
Standard component's configuration method. |
| Methods inherited from class tigase.server.AbstractMessageReceiver |
|---|
addOutPacketNB, addOutPackets, addOutPacketWithTimeout, addPacket, addPacketNB, addPackets, addRegexRouting, addTimerTask, addTimerTask, clearRegexRoutings, everyHour, everyMinute, everySecond, getRegexRoutings, hashCodeForPacket, isInRegexRoutings, newPacketId, processingThreads, processOutPacket, processPacket, release, removeRegexRouting, setMaxQueueSize, setParent, start, stop |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface tigase.server.ServerComponent |
|---|
getComponentId, getName, initializationCompleted, processPacket, release, setName |
| Methods inherited from interface tigase.server.xmppsession.SessionManagerHandler |
|---|
getComponentId |
| Methods inherited from interface tigase.server.MessageReceiver |
|---|
getDefHostName |
| Field Detail |
|---|
public static final String CLUSTER_STRATEGY_VAR
public static final String CONNECTION_ID
public static final String MY_DOMAIN_NAME_PROP_KEY
public static final String RESOURCE
public static final String SM_ID
public static final String STRATEGY_CLASS_PROPERTY
public static final String STRATEGY_CLASS_PROP_KEY
public static final String STRATEGY_CLASS_PROP_VAL
public static final int SYNC_MAX_BATCH_SIZE
public static final String USER_ID
public static final String XMPP_SESSION_ID
| Constructor Detail |
|---|
public SessionManagerClustered()
| Method Detail |
|---|
public boolean containsJid(tigase.xmpp.BareJID jid)
containsJid in interface OnlineJidsReportercontainsJid in class SessionManagerjid - a user's JID for whom we query information.
public tigase.xmpp.JID[] getConnectionIdsForJid(tigase.xmpp.BareJID jid)
getConnectionIdsForJid in interface OnlineJidsReportergetConnectionIdsForJid in class SessionManagerjid - a user's JID for whom we query information.
public Map<String,Object> getDefaults(Map<String,Object> params)
getDefaults in interface ConfigurablegetDefaults in class SessionManagerparams - is a Map with system-wide default settings found in
init.properties file or similar location.
public void getStatistics(StatisticsList list)
getStatistics in interface StatisticsContainergetStatistics in class SessionManagerlist - is a collection with statistics to which this component can add
own metrics.public ClusteringStrategyIfc getStrategy()
public void initBindings(Bindings binds)
SessionManager
initBindings in class SessionManagerpublic void handlePresenceSet(XMPPResourceConnection conn)
handlePresenceSet in interface SessionManagerHandlerhandlePresenceSet in class SessionManagerconn - a user's XMPPResourceConnection on which the event occurred.public void handleResourceBind(XMPPResourceConnection conn)
handleResourceBind in interface SessionManagerHandlerhandleResourceBind in class SessionManagerconn - a user's XMPPResourceConnection on which the event occurred.public boolean hasCompleteJidsInfo()
hasCompleteJidsInfo in interface OnlineJidsReporterhasCompleteJidsInfo in class SessionManagerpublic void nodeConnected(String node)
nodeConnected in interface ClusteredComponentIfcnode - is a hostname of a new cluster node connected to the system.public void nodeDisconnected(String node)
nodeDisconnected in interface ClusteredComponentIfcnode - is a hostname of a cluster node generating the event.
protected Map<String,String> prepareConnectionParams(XMPPResourceConnection conn)
throws NotAuthorizedException,
NoConnectionIdException
conn - is user's XMPPResourceConnection for which Map structure is
prepare.
NoConnectionIdException
NotAuthorizedExceptionpublic void processPacket(Packet packet)
processPacket in class SessionManagerpacket -
protected boolean sendToNextNode(tigase.xmpp.JID fromNode,
Set<tigase.xmpp.JID> visitedNodes,
Map<String,String> data,
Packet packet)
packet - to be sent to a next cluster nodevisitedNodes - a list of nodes already visited by the packet.
public int processingInThreads()
processingInThreads in class SessionManagerpublic int processingOutThreads()
processingOutThreads in class SessionManagerpublic void setClusterController(ClusterControllerIfc cl_controller)
setClusterController in interface ClusteredComponentIfccl_controller - public void setProperties(Map<String,Object> props)
setProperties in interface ConfigurablesetProperties in class SessionManagerprops -
protected void closeSession(XMPPResourceConnection conn,
boolean closeOnly)
closeSession in class SessionManagertigase.server.xmppsession.SessionManager#closeSession(tigase.xmpp.
XMPPResourceConnection, boolean)
protected ConnectionRecord getConnectionRecord(tigase.xmpp.JID node,
Map<String,String> data)
node - data -
protected void requestSync(tigase.xmpp.JID node)
node - is a JID of the target cluster node.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||