|
||||||||||
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.server.xmppcomponent.ComponentConnectionManager
public class ComponentConnectionManager
Class ComponentConnectionManager Created: Tue Nov 22 07:07:11 2005
Field Summary | |
---|---|
static String |
IDENTITY_TYPE_KEY
|
static String |
IDENTITY_TYPE_VAL
|
static String |
PACK_ROUTED_KEY
|
boolean |
PACK_ROUTED_VAL
|
String |
PORT_LOCAL_HOST_PROP_VAL
|
String |
PORT_REMOTE_HOST_PROP_VAL
|
static String |
PORT_ROUTING_TABLE_PROP_KEY
|
String[] |
PORT_ROUTING_TABLE_PROP_VAL
|
SocketType |
PORT_SOCKET_PROP_VAL
|
ConnectionType |
PORT_TYPE_PROP_VAL
|
int[] |
PORTS
|
static String |
RETURN_SERVICE_DISCO_KEY
|
static boolean |
RETURN_SERVICE_DISCO_VAL
|
static String |
SECRET_PROP_KEY
|
String |
SECRET_PROP_VAL
|
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 | |
---|---|
ComponentConnectionManager()
|
Method Summary | |
---|---|
Map<String,Object> |
getDefaults(Map<String,Object> params)
Method description |
protected int[] |
getDefPlainPorts()
|
List<tigase.xml.Element> |
getDiscoFeatures(tigase.xmpp.JID from)
Method description |
tigase.xml.Element |
getDiscoInfo(String node,
tigase.xmpp.JID jid,
tigase.xmpp.JID from)
Method description |
List<tigase.xml.Element> |
getDiscoItems(String node,
tigase.xmpp.JID jid,
tigase.xmpp.JID from)
Method description |
protected long |
getMaxInactiveTime()
Method getMaxInactiveTime returns max keep-alive time
for inactive connection. |
protected Map<String,Object> |
getParamsForPort(int port)
|
protected String |
getServiceId(Packet packet)
|
protected String |
getUniqueId(XMPPIOService<Object> serv)
|
protected XMPPIOService<Object> |
getXMPPIOServiceInstance()
|
void |
processPacket(Packet packet)
Method description |
Queue<Packet> |
processSocketData(XMPPIOService<Object> serv)
Method description |
void |
serviceStarted(XMPPIOService<Object> serv)
Method description |
boolean |
serviceStopped(XMPPIOService<Object> service)
|
void |
setProperties(Map<String,Object> props)
Method description |
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, getStatistics, getXMPPIOService, getXMPPIOService, initializationCompleted, isHighThroughput, packetsReady, release, setName, start, writePacketsToSocket, writePacketToSocket, writePacketToSocket, writePacketToSocket, writeRawData |
Methods inherited from class tigase.server.AbstractMessageReceiver |
---|
addOutPacket, addOutPacketNB, addOutPackets, addOutPacketWithTimeout, addPacket, addPacketNB, addPackets, addRegexRouting, addTimerTask, addTimerTask, clearRegexRoutings, everyHour, everyMinute, everySecond, getMaxQueueSize, getRegexRoutings, hashCodeForPacket, isInRegexRoutings, newPacketId, processingThreads, 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 ConnectionType PORT_TYPE_PROP_VAL
public SocketType PORT_SOCKET_PROP_VAL
public static final String SECRET_PROP_KEY
public String SECRET_PROP_VAL
public String PORT_LOCAL_HOST_PROP_VAL
public String PORT_REMOTE_HOST_PROP_VAL
public static final String PORT_ROUTING_TABLE_PROP_KEY
public String[] PORT_ROUTING_TABLE_PROP_VAL
public static final String PACK_ROUTED_KEY
public boolean PACK_ROUTED_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
Constructor Detail |
---|
public ComponentConnectionManager()
Method Detail |
---|
public void processPacket(Packet packet)
ConnectionManager
processPacket
in class ConnectionManager<XMPPIOService<Object>>
packet
- is an instance of the Packet
class passed for processing.public Queue<Packet> processSocketData(XMPPIOService<Object> serv)
ConnectionManager
processSocketData
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.public void setProperties(Map<String,Object> props)
ConnectionManager
setProperties
in interface Configurable
setProperties
in class ConnectionManager<XMPPIOService<Object>>
protected int[] getDefPlainPorts()
getDefPlainPorts
in class ConnectionManager<XMPPIOService<Object>>
protected Map<String,Object> getParamsForPort(int port)
getParamsForPort
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 tigase.xml.Element getDiscoInfo(String node, tigase.xmpp.JID jid, tigase.xmpp.JID from)
BasicComponent
getDiscoInfo
in interface XMPPService
getDiscoInfo
in class BasicComponent
node
- is service discovery node for which the request is made. Is
normally null for the component top level request.jid
- is the jid to which the request has been made.from
- is the request sender address. Some service discovery information
is only meant for administrators.
public List<tigase.xml.Element> getDiscoFeatures(tigase.xmpp.JID from)
BasicComponent
getDiscoFeatures
in interface XMPPService
getDiscoFeatures
in class BasicComponent
from
- a request sender address. Some service disco elements are meant
to be available only to system administrarors. The component is responsible to
check whether the sender is the component administrator and return results
appropriate.
public List<tigase.xml.Element> getDiscoItems(String node, tigase.xmpp.JID jid, tigase.xmpp.JID from)
BasicComponent
getDiscoItems
in interface XMPPService
getDiscoItems
in class BasicComponent
node
- is a service discovery node for which the request has been made.jid
- is the jid to which the request has been made.from
- is the request sender address. Some service discovery information
is only meant for administrators.
protected XMPPIOService<Object> getXMPPIOServiceInstance()
getXMPPIOServiceInstance
in class ConnectionManager<XMPPIOService<Object>>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |