|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.spice.netserve.connection.handlers.AbstractRequestHandler
org.codehaus.spice.netserve.connection.handlers.DelegatingRequestHandler
org.codehaus.spice.netserve.connection.handlers.ThreadPerRequestHandler
A Handler that uses a thread from a pool for each different request.
Constructor Summary | |
ThreadPerRequestHandler(RequestHandler handler,
org.codehaus.spice.threadpool.ThreadPool threadPool)
Create handler. |
Method Summary | |
protected void |
endConnection(Socket socket)
Remove ThreadControl from list of active threads. |
void |
handleConnection(Socket socket)
Execute each request in a separate thread. |
void |
shutdown(long timeout)
Shutdown all requests including those executing in thread pool. |
Methods inherited from class org.codehaus.spice.netserve.connection.handlers.DelegatingRequestHandler |
doPerformRequest |
Methods inherited from class org.codehaus.spice.netserve.connection.handlers.AbstractRequestHandler |
createRunnable, errorClosingConnection, errorHandlingConnection, getThreadName, isShutdown, markAsShutdown, performRequest, setupThreadName |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ThreadPerRequestHandler(RequestHandler handler, org.codehaus.spice.threadpool.ThreadPool threadPool)
handler
- the underlying handlerthreadPool
- the thread pool to use to create handler threadsMethod Detail |
public void handleConnection(Socket socket)
handleConnection
in interface RequestHandler
handleConnection
in class AbstractRequestHandler
socket
- the socket to handleprotected void endConnection(Socket socket)
endConnection
in class AbstractRequestHandler
socket
- the socketpublic void shutdown(long timeout)
shutdown
in interface RequestHandler
shutdown
in class DelegatingRequestHandler
timeout
- the timeoutAbstractRequestHandler.shutdown(long)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |