当前页面:
在线文档首页 >
JBoss 4.0.1 sp1 server API Documentation 英文版文档
ServerThread (JBoss Server API) - JBoss 4.0.1 sp1 server API Documentation 英文版文档
org.jboss.invocation.pooled.server
Class ServerThread
java.lang.Object
java.lang.Thread
org.jboss.invocation.pooled.server.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
PooledInvoker'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 class will demarshal then delegate to PooledInvoker for invocation.
*NOTES* ObjectStreams were found to be better performing than the Custom marshalling
done by the TrunkInvoker.
- Version:
- $Revision: 1.6.6.1 $
- Author:
- Bill Burke
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 |
in
protected ObjectInputStream in
out
protected ObjectOutputStream out
socket
protected Socket socket
invoker
protected PooledInvoker 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,
PooledInvoker 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 © 2002 JBoss Group, LLC. All Rights Reserved.