|
|||||||||||
| 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 threads| Method Detail |
public void handleConnection(Socket socket)
handleConnection in interface RequestHandlerhandleConnection in class AbstractRequestHandlersocket - the socket to handleprotected void endConnection(Socket socket)
endConnection in class AbstractRequestHandlersocket - the socketpublic void shutdown(long timeout)
shutdown in interface RequestHandlershutdown in class DelegatingRequestHandlertimeout - the timeoutAbstractRequestHandler.shutdown(long)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||