|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Thread
org.jboss.remoting.transport.socket.ServerThread
public class ServerThread
This Thread object hold a single Socket connection to a client and is kept alive until a timeout happens, or it is aged out of the SocketServerInvoker's LRU cache.
There is also a separate thread pool that is used if the client disconnects. This thread/object is re-used in that scenario and that scenario only. This is a customization of the same ServerThread class used witht the PookedInvoker. The custimization was made to allow for remoting marshaller/unmarshaller.
| Nested Class Summary | |
|---|---|
static class |
ServerThread.AcknowledgeFailure
|
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
| Field Summary | |
|---|---|
protected LRUPool |
clientpool
|
protected boolean |
handlingResponse
|
protected static int |
id
|
protected SocketServerInvoker |
invoker
|
protected boolean |
running
|
protected java.lang.String |
serverSocketClass
|
protected boolean |
shutdown
|
protected java.util.LinkedList |
threadpool
|
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
ServerThread(java.net.Socket socket,
SocketServerInvoker invoker,
LRUPool clientpool,
java.util.LinkedList threadpool,
int timeout,
java.lang.String serverSocketClass)
|
|
| Method Summary | |
|---|---|
protected void |
acknowledge()
|
protected void |
dorun()
This is needed because Object*Streams leak |
void |
evict()
|
boolean |
getCheckingConnection()
Indicates if server will check with client (via an ACK) to see if is still there. |
static int |
nextID()
|
protected void |
processInvocation()
|
void |
run()
|
void |
shouldCheckConnection(boolean checkConnection)
Sets if server thread should check connection before continue to process on next invocation request. |
void |
shutdown()
|
void |
wakeup(java.net.Socket socket,
int timeout,
java.util.Map metadata)
|
| 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 |
|---|
protected SocketServerInvoker invoker
protected LRUPool clientpool
protected java.util.LinkedList threadpool
protected volatile boolean running
protected volatile boolean handlingResponse
protected volatile boolean shutdown
protected static int id
protected java.lang.String serverSocketClass
| Constructor Detail |
|---|
public ServerThread(java.net.Socket socket,
SocketServerInvoker invoker,
LRUPool clientpool,
java.util.LinkedList threadpool,
int timeout,
java.lang.String serverSocketClass)
throws java.lang.Exception
java.lang.Exception| Method Detail |
|---|
public static int nextID()
public void shutdown()
public void shouldCheckConnection(boolean checkConnection)
checkConnection - public boolean getCheckingConnection()
public void evict()
public void wakeup(java.net.Socket socket,
int timeout,
java.util.Map metadata)
throws java.lang.Exception
java.lang.Exceptionpublic void run()
run in interface java.lang.Runnablerun in class java.lang.Thread
protected void acknowledge()
throws java.lang.Exception
java.lang.Exception
protected void processInvocation()
throws java.lang.Exception
java.lang.Exceptionprotected void dorun()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||