org.jboss.remoting.transport.socket
Class ServerThread
java.lang.Object
java.lang.Thread
org.jboss.remoting.transport.socket.ServerThread
- All Implemented Interfaces:
- Runnable
- public class ServerThread
- extends Thread
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.
- Version:
- $Revision: 1.9 $
- Author:
- Bill Burke, Tom Elrod
Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield |
bis
protected BufferedInputStream bis
bos
protected BufferedOutputStream bos
in
protected ObjectInputStream in
out
protected ObjectOutputStream out
socket
protected Socket socket
invoker
protected SocketServerInvoker invoker
clientpool
protected LRUPool clientpool
threadpool
protected LinkedList threadpool
running
protected volatile boolean running
handlingResponse
protected volatile boolean handlingResponse
shutdown
protected volatile boolean shutdown
id
protected static int id
ServerThread
public ServerThread(Socket socket,
SocketServerInvoker invoker,
LRUPool clientpool,
LinkedList threadpool,
int timeout)
throws Exception
nextID
public static int nextID()
shutdown
public void shutdown()
evict
public void evict()
wakeup
public void wakeup(Socket socket,
int timeout)
throws Exception
- Throws:
Exception
run
public void run()
acknowledge
protected void acknowledge()
throws Exception
- Throws:
Exception
processInvocation
protected void processInvocation()
throws Exception
- Throws:
Exception
dorun
protected void dorun()
- This is needed because Object*Streams leak
Copyright © 2004 JBoss Inc. All Rights Reserved.