org.codehaus.spice.netserve.connection.handlers
Class DelegatingRequestHandler

java.lang.Object
  extended byorg.codehaus.spice.netserve.connection.handlers.AbstractRequestHandler
      extended byorg.codehaus.spice.netserve.connection.handlers.DelegatingRequestHandler
All Implemented Interfaces:
RequestHandler
Direct Known Subclasses:
ThreadPerRequestHandler

public class DelegatingRequestHandler
extends AbstractRequestHandler

A simple handler that delegates to another handler.

Version:
$Revision: 1.2 $ $Date: 2004/03/21 23:42:58 $
Author:
Peter Donald

Constructor Summary
DelegatingRequestHandler(RequestHandler handler)
          Create handler.
 
Method Summary
protected  void doPerformRequest(Socket socket)
          Delegate request to supplied handler.
 void shutdown(long timeout)
          Shutdown the handler and any requests currently being handled.
 
Methods inherited from class org.codehaus.spice.netserve.connection.handlers.AbstractRequestHandler
createRunnable, endConnection, errorClosingConnection, errorHandlingConnection, getThreadName, handleConnection, isShutdown, markAsShutdown, performRequest, setupThreadName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DelegatingRequestHandler

public DelegatingRequestHandler(RequestHandler handler)
Create handler.

Parameters:
handler - the handler to delegate to
Method Detail

doPerformRequest

protected void doPerformRequest(Socket socket)
                         throws Exception
Delegate request to supplied handler.

Specified by:
doPerformRequest in class AbstractRequestHandler
Parameters:
socket - the socket
Throws:
Exception - on error

shutdown

public void shutdown(long timeout)
Description copied from interface: RequestHandler
Shutdown the handler and any requests currently being handled. The timeout specifies the time to wait while shutting down request handlers. A timeout of 0 indicates that should wait indefinetly.

Specified by:
shutdown in interface RequestHandler
Overrides:
shutdown in class AbstractRequestHandler
See Also:
AbstractRequestHandler.shutdown(long)


Copyright © 1999-2004 Codehaus. All Rights Reserved.