org.codehaus.spice.netserve.connection.handlers
Class ManagedRequestHandler
java.lang.Object
org.codehaus.spice.netserve.connection.handlers.AbstractRequestHandler
org.codehaus.spice.netserve.connection.handlers.ManagedRequestHandler
- All Implemented Interfaces:
- RequestHandler
- public abstract class ManagedRequestHandler
- extends AbstractRequestHandler
A handler that allows user to handle ConnectionHandlers.
Subclasses may pool or create transient handlers etc.
Methods inherited from class org.codehaus.spice.netserve.connection.handlers.AbstractRequestHandler |
createRunnable, endConnection, errorClosingConnection, errorHandlingConnection, getThreadName, handleConnection, isShutdown, markAsShutdown, performRequest, setupThreadName, shutdown |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ManagedRequestHandler
public ManagedRequestHandler()
doPerformRequest
protected void doPerformRequest(Socket socket)
throws Exception
- Actually handle the request.
Assume that the caller will gracefully
handle unexpected exceptions and shutdown
the socket when this method returns.
- Specified by:
doPerformRequest
in class AbstractRequestHandler
- Parameters:
socket
- the socket
- Throws:
Exception
- if an erro roccurs
aquireHandler
protected abstract RequestHandler aquireHandler(Socket socket)
- Retrieve the underlying handler.
- Parameters:
socket
- the socket
- Returns:
- the RequestHandler
releaseHandler
protected abstract void releaseHandler(RequestHandler handler)
- Release the underlying handler.
- Parameters:
handler
- the handler
Copyright © 1999-2004 Codehaus. All Rights Reserved.