tigase.server.bosh
Class BoshConnectionManager

java.lang.Object
  extended by tigase.server.AbstractMessageReceiver
      extended by tigase.server.ConnectionManager<BoshIOService>
          extended by tigase.server.bosh.BoshConnectionManager
All Implemented Interfaces:
Configurable, IOServiceListener, BoshSessionTaskHandler, MessageReceiver, ServerComponent, StatisticsContainer, XMPPIOServiceListener

public class BoshConnectionManager
extends ConnectionManager<BoshIOService>
implements BoshSessionTaskHandler

Describe class BoshConnectionManager here. Created: Sat Jun 2 12:24:29 2007

Version:
$Rev: 895 $
Author:
Artur Hefczyc

Field Summary
 
Fields inherited from class tigase.server.ConnectionManager
connectionDelay, MAX_RECONNECTS_PROP_KEY, PORT_CLASS_PROP_KEY, PORT_IFC_PROP_KEY, PORT_KEY, PORT_REMOTE_HOST_PROP_KEY, PORT_REMOTE_HOST_PROP_VAL, PORT_SOCKET_PROP_KEY, PORT_TYPE_PROP_KEY, PORTS_PROP_KEY, PROP_KEY, startDelay, TLS_ALLOW_INVALID_CERTS_PROP_KEY, TLS_ALLOW_INVALID_CERTS_PROP_VAL, TLS_ALLOW_SELF_SIGNED_CERTS_PROP_KEY, TLS_ALLOW_SELF_SIGNED_CERTS_PROP_VAL, TLS_CONTAINER_CLASS_PROP_KEY, TLS_CONTAINER_CLASS_PROP_VAL, TLS_DEF_CERT_PROP_KEY, TLS_DEF_CERT_PROP_VAL, TLS_KEYS_STORE_PASSWD_PROP_KEY, TLS_KEYS_STORE_PASSWD_PROP_VAL, TLS_KEYS_STORE_PROP_KEY, TLS_KEYS_STORE_PROP_VAL, TLS_PROP_KEY, TLS_REQUIRED_PROP_KEY, TLS_REQUIRED_PROP_VAL, TLS_SERVER_CERTS_DIR_PROP_KEY, TLS_SERVER_CERTS_DIR_PROP_VAL, TLS_TRUSTED_CERTS_DIR_PROP_KEY, TLS_TRUSTED_CERTS_DIR_PROP_VAL, TLS_TRUSTS_STORE_PASSWD_PROP_KEY, TLS_TRUSTS_STORE_PASSWD_PROP_VAL, TLS_TRUSTS_STORE_PROP_KEY, TLS_TRUSTS_STORE_PROP_VAL, TLS_USE_PROP_KEY, TLS_USE_PROP_VAL
 
Fields inherited from class tigase.server.AbstractMessageReceiver
HOUR, MAX_QUEUE_SIZE_PROP_KEY, MAX_QUEUE_SIZE_PROP_VAL, maxQueueSize, MINUTE, SECOND
 
Fields inherited from interface tigase.conf.Configurable
ADMINS_PROP_KEY, BOSH_COMP_CLASS_NAME, C2S_COMP_CLASS_NAME, DEF_HOSTNAME_PROP_KEY, DRUPAL_REPO_CLASS_PROP_VAL, DRUPAL_REPO_URL_PROP_VAL, EXT_COMP_CLASS_NAME, GEN_ADMINS, GEN_AUTH_DB, GEN_AUTH_DB_URI, GEN_COMP_CLASS, GEN_COMP_NAME, GEN_CONF, GEN_CONFIG, GEN_CONFIG_ALL, GEN_CONFIG_COMP, GEN_CONFIG_CS, GEN_CONFIG_DEF, GEN_CONFIG_SM, GEN_DEBUG, GEN_EXT_COMP, GEN_SM_PLUGINS, GEN_SREC_ADMINS, GEN_SREC_DB, GEN_SREC_DB_URI, GEN_TEST, GEN_TRUSTED, GEN_USER_DB, GEN_USER_DB_URI, GEN_VIRT_HOSTS, LIBRESOURCE_REPO_CLASS_PROP_VAL, LIBRESOURCE_REPO_URL_PROP_VAL, MYSQL_REPO_CLASS_PROP_VAL, MYSQL_REPO_URL_PROP_VAL, NULL_ROUTING, PGSQL_REPO_CLASS_PROP_VAL, PGSQL_REPO_URL_PROP_VAL, ROUTER_COMP_CLASS_NAME, S2S_COMP_CLASS_NAME, SM_COMP_CLASS_NAME, SRECV_COMP_CLASS_NAME, SSEND_COMP_CLASS_NAME, TRUSTED_PROP_KEY, XML_REPO_CLASS_PROP_VAL, XML_REPO_URL_PROP_VAL
 
Constructor Summary
BoshConnectionManager()
           
 
Method Summary
 void cancelTask(java.util.TimerTask tt)
           
 java.util.Map<java.lang.String,java.lang.Object> getDefaults(java.util.Map<java.lang.String,java.lang.Object> params)
          Returns defualt configuration settings for this object.
protected  int[] getDefPlainPorts()
           
protected  long getMaxInactiveTime()
          Method getMaxInactiveTime returns max keep-alive time for inactive connection.
protected  BoshIOService getXMPPIOServiceInstance()
           
 void processPacket(Packet packet)
           
 java.util.Queue<Packet> processSocketData(BoshIOService serv)
           
 java.util.TimerTask scheduleTask(BoshSession bs, long delay)
           
 void serviceStarted(BoshIOService service)
           
 void serviceStopped(BoshIOService service)
           
 void setProperties(java.util.Map<java.lang.String,java.lang.Object> props)
          Sets all configuration properties for object.
 void xmppStreamClosed(BoshIOService serv)
           
 java.lang.String xmppStreamOpened(BoshIOService serv, java.util.Map<java.lang.String,java.lang.String> attribs)
           
 
Methods inherited from class tigase.server.ConnectionManager
getDefSSLPorts, getParamsForPort, getServiceId, getStatistics, getUniqueId, getXMPPIOService, getXMPPIOService, packetsReady, packetsReady, reconnectService, release, serviceStopped, setName, start, startService, streamClosed, streamOpened, writePacketsToSocket, writePacketToSocket, writePacketToSocket, writePacketToSocket
 
Methods inherited from class tigase.server.AbstractMessageReceiver
addOutPacket, addOutPacketNB, addOutPackets, addPacket, addPackets, addRegexRouting, addRouting, clearRegexRoutings, clearRoutings, getDefHostName, getDefMaxQueueSize, getName, getRegexRoutings, getRoutings, isInRegexRoutings, isInRoutings, myDomain, processPacket, removeRegexRouting, removeRouting, setMaxQueueSize, setParent, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BoshConnectionManager

public BoshConnectionManager()
Method Detail

processPacket

public void processPacket(Packet packet)
Overrides:
processPacket in class ConnectionManager<BoshIOService>

processSocketData

public java.util.Queue<Packet> processSocketData(BoshIOService serv)
Specified by:
processSocketData in class ConnectionManager<BoshIOService>

getDefaults

public java.util.Map<java.lang.String,java.lang.Object> getDefaults(java.util.Map<java.lang.String,java.lang.Object> params)
Description copied from class: AbstractMessageReceiver
Returns defualt configuration settings for this object.

Specified by:
getDefaults in interface Configurable
Overrides:
getDefaults in class ConnectionManager<BoshIOService>

setProperties

public void setProperties(java.util.Map<java.lang.String,java.lang.Object> props)
Description copied from class: AbstractMessageReceiver
Sets all configuration properties for object.

Specified by:
setProperties in interface Configurable
Overrides:
setProperties in class ConnectionManager<BoshIOService>

getDefPlainPorts

protected int[] getDefPlainPorts()
Overrides:
getDefPlainPorts in class ConnectionManager<BoshIOService>

serviceStopped

public void serviceStopped(BoshIOService service)
Overrides:
serviceStopped in class ConnectionManager<BoshIOService>

serviceStarted

public void serviceStarted(BoshIOService service)
Overrides:
serviceStarted in class ConnectionManager<BoshIOService>

getMaxInactiveTime

protected long getMaxInactiveTime()
Method 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...

Specified by:
getMaxInactiveTime in class ConnectionManager<BoshIOService>
Returns:
a long value

xmppStreamClosed

public void xmppStreamClosed(BoshIOService serv)
Specified by:
xmppStreamClosed in class ConnectionManager<BoshIOService>

xmppStreamOpened

public java.lang.String xmppStreamOpened(BoshIOService serv,
                                         java.util.Map<java.lang.String,java.lang.String> attribs)
Specified by:
xmppStreamOpened in class ConnectionManager<BoshIOService>

getXMPPIOServiceInstance

protected BoshIOService getXMPPIOServiceInstance()
Specified by:
getXMPPIOServiceInstance in class ConnectionManager<BoshIOService>

scheduleTask

public java.util.TimerTask scheduleTask(BoshSession bs,
                                        long delay)
Specified by:
scheduleTask in interface BoshSessionTaskHandler

cancelTask

public void cancelTask(java.util.TimerTask tt)
Specified by:
cancelTask in interface BoshSessionTaskHandler


Copyright © 2008 Tigase. All Rights Reserved.