|
||||||||||
| 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<IO>
IO - public abstract class ConnectionManager<IO extends XMPPIOService<?>>
Describe class ConnectionManager here. Created: Sun Jan 22 22:52:58 2006
| Nested Class Summary | |
|---|---|
static class |
ConnectionManager.LIMIT_ACTION
Describe class LIMIT_ACTION here. |
| Field Summary | |
|---|---|
protected long |
connectionDelay
Field description |
static String |
HT_TRAFFIC_THROTTLING_PROP_KEY
Field description |
static String |
HT_TRAFFIC_THROTTLING_PROP_VAL
Field description |
protected static long |
LAST_MINUTE_BIN_LIMIT_PROP_VAL
Field description |
protected static long |
LAST_MINUTE_PACKETS_LIMIT_PROP_VAL
Field description |
protected static String |
MAX_INACTIVITY_TIME
Field description |
protected static String |
MAX_RECONNECTS_PROP_KEY
Field description |
protected int |
net_buffer
Field description |
static String |
NET_BUFFER_HT_PROP_KEY
Field description. |
protected static int |
NET_BUFFER_HT_PROP_VAL
Field description |
protected static String |
NET_BUFFER_PROP_KEY
Field description |
static String |
NET_BUFFER_ST_PROP_KEY
Field description. |
protected static int |
NET_BUFFER_ST_PROP_VAL
Field description |
protected static String |
PORT_CLASS_PROP_KEY
Field description |
protected static String |
PORT_IFC_PROP_KEY
Field description |
String[] |
PORT_IFC_PROP_VAL
Field description. |
protected static String |
PORT_KEY
Field description |
static String |
PORT_LOCAL_HOST_PROP_KEY
Field description. |
protected static String |
PORT_REMOTE_HOST_PROP_KEY
Field description |
protected static String |
PORT_REMOTE_HOST_PROP_VAL
Field description |
protected static String |
PORT_SOCKET_PROP_KEY
Field description |
protected static String |
PORT_TYPE_PROP_KEY
Field description |
protected static String |
PORTS_PROP_KEY
Field description |
protected static String |
PROP_KEY
Field description |
static String |
ST_TRAFFIC_THROTTLING_PROP_KEY
Field description |
static String |
ST_TRAFFIC_THROTTLING_PROP_VAL
Field description |
protected static String |
TLS_PROP_KEY
Field description |
protected static String |
TLS_REQUIRED_PROP_KEY
Field description |
protected static boolean |
TLS_REQUIRED_PROP_VAL
Field description |
protected static String |
TLS_USE_PROP_KEY
Field description |
protected static boolean |
TLS_USE_PROP_VAL
Field description |
protected static long |
TOTAL_BIN_LIMIT_PROP_VAL
Field description |
protected static long |
TOTAL_PACKETS_LIMIT_PROP_VAL
Field description |
static String |
TRAFFIC_THROTTLING_PROP_KEY
Field description |
protected static String |
WHITE_CHAR_ACK_PROP_KEY
Field description |
protected static boolean |
WHITE_CHAR_ACK_PROP_VAL
Field description |
protected static String |
XMPP_ACK_PROP_KEY
Field description |
protected static boolean |
XMPP_ACK_PROP_VAL
Field description |
| 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, SCHEDULER_THREADS_PROP_KEY, 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.disco.XMPPService |
|---|
CMD_FEATURES, DEF_FEATURES, INFO_XMLNS, ITEMS_XMLNS |
| Constructor Summary | |
|---|---|
ConnectionManager()
|
|
| Method Summary | ||
|---|---|---|
protected void |
addWaitingTask(Map<String,Object> conn)
Method description |
|
protected
|
checkHighThroughputProperty(String ht_def_key,
T ht_dev_val,
String st_def_key,
T st_def_val,
String prop_key,
Class<T> prop_val_class,
Map<String,Object> params,
Map<String,Object> props)
Method description |
|
boolean |
checkTrafficLimits(IO serv)
Method description |
|
protected int |
countIOServices()
Returns number of active network connections (IOServices). |
|
protected void |
doForAllServices(ServiceChecker<IO> checker)
Perform a given action defined by ServiceChecker for all active IOService objects (active network connections). |
|
void |
everyMinute()
Method description |
|
Map<String,Object> |
getDefaults(Map<String,Object> params)
Method description |
|
protected int[] |
getDefPlainPorts()
Method description |
|
protected int[] |
getDefSSLPorts()
Method description |
|
protected String |
getDefTrafficThrottling()
Method description |
|
protected abstract long |
getMaxInactiveTime()
Method description |
|
protected Map<String,Object> |
getParamsForPort(int port)
Method description |
|
protected String |
getServiceId(tigase.xmpp.JID jid)
Method description |
|
protected String |
getServiceId(Packet packet)
Method description |
|
void |
getStatistics(StatisticsList list)
Generates the component statistics. |
|
protected String |
getUniqueId(IO serv)
Method description |
|
protected IO |
getXMPPIOService(Packet p)
Method description |
|
protected IO |
getXMPPIOService(String serviceId)
Method description |
|
protected abstract IO |
getXMPPIOServiceInstance()
Method description |
|
int |
hashCodeForPacket(Packet packet)
This method can be overwritten in extending classes to get a different packets distribution to different threads. |
|
void |
initBindings(Bindings binds)
Method description |
|
void |
initializationCompleted()
Method description |
|
protected boolean |
isHighThroughput()
Method description |
|
protected boolean |
isTlsWantClientAuthEnabled()
|
|
void |
packetsReady(IO serv)
Method description |
|
int |
processingInThreads()
Method description |
|
int |
processingOutThreads()
Method description |
|
void |
processPacket(Packet packet)
Method description |
|
abstract Queue<Packet> |
processSocketData(IO serv)
Method description |
|
abstract void |
reconnectionFailed(Map<String,Object> port_props)
Method description |
|
void |
release()
Method description |
|
void |
serviceStarted(IO service)
Method description |
|
boolean |
serviceStopped(IO service)
|
|
void |
setName(String name)
Method description |
|
void |
setProperties(Map<String,Object> props)
Method description |
|
void |
stop()
Method description |
|
void |
updateConnectionDetails(Map<String,Object> port_props)
Method description |
|
void |
writePacketsToSocket(IO serv,
Queue<Packet> packets)
Method description |
|
boolean |
writePacketToSocket(IO ios,
Packet p)
Method description |
|
protected boolean |
writePacketToSocket(Packet p)
|
|
protected boolean |
writePacketToSocket(Packet p,
String serviceId)
Method description |
|
protected void |
writeRawData(IO ios,
String data)
Method description |
|
| Methods inherited from class tigase.server.AbstractMessageReceiver |
|---|
addOutPacket, addOutPacketNB, addOutPackets, addOutPacketWithTimeout, addPacket, addPacketNB, addPackets, addRegexRouting, addTimerTask, addTimerTask, addTimerTask, addTimerTask, clearRegexRoutings, everyHour, everySecond, getMaxQueueSize, getRegexRoutings, isInRegexRoutings, newPacketId, processingThreads, processOutPacket, processPacket, removeRegexRouting, schedulerThreads, setMaxQueueSize, setParent, start |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface tigase.xmpp.XMPPIOServiceListener |
|---|
xmppStreamClosed, xmppStreamOpened |
| Methods inherited from interface tigase.net.IOServiceListener |
|---|
tlsHandshakeCompleted |
| Methods inherited from interface tigase.server.MessageReceiver |
|---|
getDefHostName |
| Methods inherited from interface tigase.server.ServerComponent |
|---|
getComponentId, getName, isInitializationComplete |
| Field Detail |
|---|
public static final String HT_TRAFFIC_THROTTLING_PROP_KEY
public static final String HT_TRAFFIC_THROTTLING_PROP_VAL
public static final String NET_BUFFER_HT_PROP_KEY
public static final String NET_BUFFER_ST_PROP_KEY
public static final String PORT_LOCAL_HOST_PROP_KEY
public static final String ST_TRAFFIC_THROTTLING_PROP_KEY
public static final String ST_TRAFFIC_THROTTLING_PROP_VAL
public static final String TRAFFIC_THROTTLING_PROP_KEY
protected static final long LAST_MINUTE_BIN_LIMIT_PROP_VAL
protected static final long LAST_MINUTE_PACKETS_LIMIT_PROP_VAL
protected static final String MAX_INACTIVITY_TIME
protected static final String MAX_RECONNECTS_PROP_KEY
protected static final int NET_BUFFER_HT_PROP_VAL
protected static final String NET_BUFFER_PROP_KEY
protected static final int NET_BUFFER_ST_PROP_VAL
protected static final String PORT_CLASS_PROP_KEY
protected static final String PORT_IFC_PROP_KEY
protected static final String PORT_KEY
protected static final String PORT_REMOTE_HOST_PROP_KEY
protected static final String PORT_REMOTE_HOST_PROP_VAL
protected static final String PORT_SOCKET_PROP_KEY
protected static final String PORT_TYPE_PROP_KEY
protected static final String PROP_KEY
protected static final long TOTAL_BIN_LIMIT_PROP_VAL
protected static final long TOTAL_PACKETS_LIMIT_PROP_VAL
protected static final String WHITE_CHAR_ACK_PROP_KEY
protected static final String XMPP_ACK_PROP_KEY
protected static final boolean XMPP_ACK_PROP_VAL
protected static final boolean WHITE_CHAR_ACK_PROP_VAL
protected static final String PORTS_PROP_KEY
protected static final boolean TLS_USE_PROP_VAL
protected static final String TLS_PROP_KEY
protected static final String TLS_USE_PROP_KEY
protected static final boolean TLS_REQUIRED_PROP_VAL
protected static final String TLS_REQUIRED_PROP_KEY
public String[] PORT_IFC_PROP_VAL
protected int net_buffer
protected long connectionDelay
| Constructor Detail |
|---|
public ConnectionManager()
| Method Detail |
|---|
public boolean checkTrafficLimits(IO serv)
serv -
public void everyMinute()
everyMinute in class AbstractMessageReceiverpublic int hashCodeForPacket(Packet packet)
hashCodeForPacket in class AbstractMessageReceiverpacket -
public void initBindings(Bindings binds)
initBindings in class BasicComponentbinds - public void initializationCompleted()
initializationCompleted in interface ServerComponentinitializationCompleted in class BasicComponent
public void packetsReady(IO serv)
throws IOException
packetsReady in interface IOServiceListener<IO extends XMPPIOService<?>>serv -
IOExceptionpublic int processingInThreads()
processingInThreads in class AbstractMessageReceiverpublic int processingOutThreads()
processingOutThreads in class AbstractMessageReceiverpublic void processPacket(Packet packet)
processPacket in class AbstractMessageReceiverpacket - public abstract Queue<Packet> processSocketData(IO serv)
serv -
public abstract void reconnectionFailed(Map<String,Object> port_props)
port_props - public void release()
release in interface ServerComponentrelease in class AbstractMessageReceiver@TODO(note="Do something if service with the same unique ID is already started, possibly kill the old one...") public void serviceStarted(IO service)
service - public boolean serviceStopped(IO service)
serviceStopped in interface IOServiceListener<IO extends XMPPIOService<?>>service -
public void stop()
stop in class AbstractMessageReceiverpublic void updateConnectionDetails(Map<String,Object> port_props)
port_props -
public void writePacketsToSocket(IO serv,
Queue<Packet> packets)
serv - packets -
public boolean writePacketToSocket(IO ios,
Packet p)
ios - p -
public Map<String,Object> getDefaults(Map<String,Object> params)
getDefaults in interface ConfigurablegetDefaults in class AbstractMessageReceiverparams -
public void getStatistics(StatisticsList list)
getStatistics in interface StatisticsContainergetStatistics in class AbstractMessageReceiverlist - is a collection to put the component statistics in.public void setName(String name)
setName in interface ServerComponentsetName in class AbstractMessageReceivername - public void setProperties(Map<String,Object> props)
setProperties in interface ConfigurablesetProperties in class AbstractMessageReceiverprops - protected void addWaitingTask(Map<String,Object> conn)
conn -
protected <T> void checkHighThroughputProperty(String ht_def_key,
T ht_dev_val,
String st_def_key,
T st_def_val,
String prop_key,
Class<T> prop_val_class,
Map<String,Object> params,
Map<String,Object> props)
T - ht_def_key - ht_dev_val - st_def_key - st_def_val - prop_key - prop_val_class - params - props - protected int countIOServices()
protected void doForAllServices(ServiceChecker<IO> checker)
checker - is a ServiceChecker instance defining an action to
perform for all IOService objects.protected boolean writePacketToSocket(Packet p)
p -
protected boolean writePacketToSocket(Packet p,
String serviceId)
p - serviceId -
protected void writeRawData(IO ios,
String data)
ios - data - protected int[] getDefPlainPorts()
protected int[] getDefSSLPorts()
protected String getDefTrafficThrottling()
protected abstract long getMaxInactiveTime()
protected Map<String,Object> getParamsForPort(int port)
port -
protected String getServiceId(Packet packet)
packet -
protected String getServiceId(tigase.xmpp.JID jid)
jid -
protected String getUniqueId(IO serv)
serv -
protected IO getXMPPIOService(String serviceId)
serviceId -
protected IO getXMPPIOService(Packet p)
p -
protected abstract IO getXMPPIOServiceInstance()
protected boolean isHighThroughput()
protected boolean isTlsWantClientAuthEnabled()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||