|
Connection Manager 3.4.4 Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
org.jivesoftware.multiplexer.ConnectionWorkerThread
public class ConnectionWorkerThread
Thread that creates and keeps a connection to the server. This thread is responsable
for actually forwarding clients traffic to the server. If the connection is no longer
active then the thread is going to be discarded and a new one is created and added to
the thread pool that is kept in ServerSurrogate
.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
Field Summary | |
---|---|
static int |
DEFAULT_MULTIPLEX_PORT
The default XMPP port for connection multiplex. |
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
ConnectionWorkerThread(java.lang.ThreadGroup group,
java.lang.Runnable target,
java.lang.String name,
long stackSize)
|
Method Summary | |
---|---|
void |
clientSessionClosed(java.lang.String streamID)
Sends a notification to the main server that a client session has been closed. |
void |
clientSessionCreated(java.lang.String streamID)
Sends a notification to the main server that a new client session has been created. |
void |
deliver(java.lang.String stanza,
java.lang.String streamID)
Delivers clients traffic to the server. |
void |
deliveryFailed(org.dom4j.Element stanza,
java.lang.String streamID)
Sends notification to the main server that delivery of a stanza to a client has failed. |
SocketConnection |
getConnection()
Returns the connection to the server. |
boolean |
isValid()
Returns true if there is a connection to the server that is still active. |
void |
run()
|
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int DEFAULT_MULTIPLEX_PORT
Constructor Detail |
---|
public ConnectionWorkerThread(java.lang.ThreadGroup group, java.lang.Runnable target, java.lang.String name, long stackSize)
Method Detail |
---|
public boolean isValid()
public SocketConnection getConnection()
public void clientSessionCreated(java.lang.String streamID)
streamID
- the stream ID assigned by the connection manager to the new session.public void clientSessionClosed(java.lang.String streamID)
streamID
- the stream ID assigned by the connection manager to the closed session.public void deliveryFailed(org.dom4j.Element stanza, java.lang.String streamID)
stanza
- the stanza that was not sent to the client.streamID
- the stream ID assigned by the connection manager to the no
longer available session.public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
public void deliver(java.lang.String stanza, java.lang.String streamID)
stanza
- the original client stanza that is going to be wrapped.streamID
- the stream ID assigned by the connection manager to the client session.
|
Connection Manager 3.4.4 Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |