|
||||||||||
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.ConnectionManager<XMPPIOService<Object>>
tigase.cluster.ClusterConnectionManager
public class ClusterConnectionManager
Class ClusterConnectionManager Created: Tue Nov 22 07:07:11 2005
Field Summary | |
---|---|
static String |
CLUSTER_CONTR_ID_PROP_KEY
|
static String |
COMPRESS_STREAM_PROP_KEY
|
static boolean |
COMPRESS_STREAM_PROP_VAL
|
static String |
CONNECT_ALL_PAR
|
static String |
CONNECT_ALL_PROP_KEY
|
static boolean |
CONNECT_ALL_PROP_VAL
|
static String |
IDENTITY_TYPE_KEY
|
static String |
IDENTITY_TYPE_VAL
|
String[] |
PORT_IFC_PROP_VAL
|
static String |
PORT_LOCAL_HOST_PROP_KEY
|
static String |
PORT_ROUTING_TABLE_PROP_KEY
|
int[] |
PORTS
|
static String |
RETURN_SERVICE_DISCO_KEY
|
static boolean |
RETURN_SERVICE_DISCO_VAL
|
static String |
SECRET_PROP_KEY
|
String |
SECRET_PROP_VAL
|
static String |
XMLNS
|
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, maxQueueSize, MINUTE, OUTGOING_FILTERS_PROP_KEY, OUTGOING_FILTERS_PROP_VAL, SECOND |
Fields inherited from class tigase.server.BasicComponent |
---|
admins, SCRIPTS_DIR_PROP_DEF, SCRIPTS_DIR_PROP_KEY, vHostManager |
Fields inherited from interface tigase.disco.XMPPService |
---|
CMD_FEATURES, DEF_FEATURES, INFO_XMLNS, ITEMS_XMLNS |
Constructor Summary | |
---|---|
ClusterConnectionManager()
|
Method Summary | |
---|---|
Map<String,Object> |
getDefaults(Map<String,Object> params)
Method description |
protected int[] |
getDefPlainPorts()
|
String |
getDiscoCategoryType()
Method description |
String |
getDiscoDescription()
Method description |
protected long |
getMaxInactiveTime()
Method getMaxInactiveTime returns max keep-alive time
for inactive connection. |
protected Integer |
getMaxQueueSize(int def)
|
protected Map<String,Object> |
getParamsForPort(int port)
|
protected String |
getServiceId(Packet packet)
|
void |
getStatistics(StatisticsList list)
Generates the component statistics. |
protected String |
getUniqueId(XMPPIOService<Object> serv)
|
protected XMPPIOService<Object> |
getXMPPIOServiceInstance()
|
int |
hashCodeForPacket(Packet packet)
This method can be overwritten in extending classes to get a different packets distribution to different threads. |
protected boolean |
isHighThroughput()
|
void |
nodeConnected(String node)
|
void |
nodeDisconnected(String node)
|
int |
processingThreads()
Method description |
void |
processPacket(Packet packet)
Method description |
Queue<Packet> |
processSocketData(XMPPIOService<Object> serv)
Method description |
protected void |
serviceConnected(XMPPIOService<Object> serv)
|
void |
serviceStarted(XMPPIOService<Object> serv)
Method description |
boolean |
serviceStopped(XMPPIOService<Object> service)
|
void |
setClusterController(ClusterController cl_controller)
|
void |
setProperties(Map<String,Object> props)
Method description |
protected boolean |
writePacketToSocket(Packet p)
|
void |
xmppStreamClosed(XMPPIOService<Object> serv)
|
String |
xmppStreamOpened(XMPPIOService<Object> service,
Map<String,String> attribs)
|
Methods inherited from class tigase.server.ConnectionManager |
---|
addWaitingTask, countIOServices, doForAllServices, getDefSSLPorts, getServiceId, getXMPPIOService, getXMPPIOService, initializationCompleted, packetsReady, release, setName, start, writePacketsToSocket, writePacketToSocket, writePacketToSocket, writeRawData |
Methods inherited from class tigase.server.AbstractMessageReceiver |
---|
addOutPacket, addOutPacketNB, addOutPackets, addOutPacketWithTimeout, addPacket, addPacketNB, addPackets, addRegexRouting, addTimerTask, addTimerTask, clearRegexRoutings, everyHour, everyMinute, everySecond, getRegexRoutings, isInRegexRoutings, newPacketId, processPacket, removeRegexRouting, setMaxQueueSize, setParent, 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.MessageReceiver |
---|
getDefHostName |
Field Detail |
---|
public int[] PORTS
public static final String SECRET_PROP_KEY
public String SECRET_PROP_VAL
public static final String PORT_LOCAL_HOST_PROP_KEY
public static final String PORT_ROUTING_TABLE_PROP_KEY
public String[] PORT_IFC_PROP_VAL
public static final String RETURN_SERVICE_DISCO_KEY
public static final boolean RETURN_SERVICE_DISCO_VAL
public static final String IDENTITY_TYPE_KEY
public static final String IDENTITY_TYPE_VAL
public static final String CONNECT_ALL_PAR
public static final String CONNECT_ALL_PROP_KEY
public static final String CLUSTER_CONTR_ID_PROP_KEY
public static final boolean CONNECT_ALL_PROP_VAL
public static final String COMPRESS_STREAM_PROP_KEY
public static final boolean COMPRESS_STREAM_PROP_VAL
public static final String XMLNS
Constructor Detail |
---|
public ClusterConnectionManager()
Method Detail |
---|
public int hashCodeForPacket(Packet packet)
hashCodeForPacket
in class AbstractMessageReceiver
packet
-
@TODO(note="The number of threads should be equal or greater to number of cluster nodes.") public int processingThreads()
AbstractMessageReceiver
processingThreads
in class AbstractMessageReceiver
public void processPacket(Packet packet)
ConnectionManager
processPacket
in class ConnectionManager<XMPPIOService<Object>>
packet
- is an instance of the Packet
class passed for processing.protected boolean writePacketToSocket(Packet p)
writePacketToSocket
in class ConnectionManager<XMPPIOService<Object>>
public Queue<Packet> processSocketData(XMPPIOService<Object> serv)
ConnectionManager
processSocketData
in class ConnectionManager<XMPPIOService<Object>>
protected void serviceConnected(XMPPIOService<Object> serv)
public void setProperties(Map<String,Object> props)
ConnectionManager
setProperties
in interface Configurable
setProperties
in class ConnectionManager<XMPPIOService<Object>>
public Map<String,Object> getDefaults(Map<String,Object> params)
ConnectionManager
getDefaults
in interface Configurable
getDefaults
in class ConnectionManager<XMPPIOService<Object>>
params
- is a Map
with some initial properties set for the
starting up server. These parameters can be used as a hints to generate component's
default configuration.
Map
with the component default configuration.protected Map<String,Object> getParamsForPort(int port)
getParamsForPort
in class ConnectionManager<XMPPIOService<Object>>
protected int[] getDefPlainPorts()
getDefPlainPorts
in class ConnectionManager<XMPPIOService<Object>>
protected String getUniqueId(XMPPIOService<Object> serv)
getUniqueId
in class ConnectionManager<XMPPIOService<Object>>
public boolean serviceStopped(XMPPIOService<Object> service)
serviceStopped
in interface IOServiceListener<XMPPIOService<Object>>
serviceStopped
in class ConnectionManager<XMPPIOService<Object>>
protected String getServiceId(Packet packet)
getServiceId
in class ConnectionManager<XMPPIOService<Object>>
public void serviceStarted(XMPPIOService<Object> serv)
ConnectionManager
serviceStarted
in class ConnectionManager<XMPPIOService<Object>>
public String xmppStreamOpened(XMPPIOService<Object> service, Map<String,String> attribs)
xmppStreamOpened
in interface XMPPIOServiceListener<XMPPIOService<Object>>
public void xmppStreamClosed(XMPPIOService<Object> serv)
xmppStreamClosed
in interface XMPPIOServiceListener<XMPPIOService<Object>>
protected long getMaxInactiveTime()
getMaxInactiveTime
returns max keep-alive time
for inactive connection. we shoulnd not really close external component
connection at all, so let's say something like: 1000 days...
getMaxInactiveTime
in class ConnectionManager<XMPPIOService<Object>>
long
valuepublic String getDiscoDescription()
BasicComponent
getDiscoDescription
in class BasicComponent
public String getDiscoCategoryType()
BasicComponent
getDiscoCategoryType
in class BasicComponent
protected XMPPIOService<Object> getXMPPIOServiceInstance()
getXMPPIOServiceInstance
in class ConnectionManager<XMPPIOService<Object>>
public void getStatistics(StatisticsList list)
ConnectionManager
getStatistics
in interface StatisticsContainer
getStatistics
in class ConnectionManager<XMPPIOService<Object>>
list
- is a collection to put the component statistics in.protected Integer getMaxQueueSize(int def)
getMaxQueueSize
in class AbstractMessageReceiver
protected boolean isHighThroughput()
isHighThroughput
in class ConnectionManager<XMPPIOService<Object>>
public void setClusterController(ClusterController cl_controller)
setClusterController
in interface ClusteredComponent
public void nodeConnected(String node)
nodeConnected
in interface ClusteredComponent
public void nodeDisconnected(String node)
nodeDisconnected
in interface ClusteredComponent
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |