rabbit.handler
Interface HandlerFactory

All Known Implementing Classes:
BaseHandler, FilterHandler, GZipHandler, ImageHandler, MultiPartHandler

public interface HandlerFactory

The methods needed to create a new Handler.

Author:
Robert Olofsson

Method Summary
 Handler getNewInstance(Connection connection, TrafficLoggerHandler tlh, HttpHeader header, HttpHeader webheader, ResourceSource content, boolean mayCache, boolean mayFilter, long size)
          Get a new Handler for the given request made.
 void setup(SProperties properties, HttpProxy proxy)
          setup the handler factory.
 

Method Detail

getNewInstance

Handler getNewInstance(Connection connection,
                       TrafficLoggerHandler tlh,
                       HttpHeader header,
                       HttpHeader webheader,
                       ResourceSource content,
                       boolean mayCache,
                       boolean mayFilter,
                       long size)
Get a new Handler for the given request made.

Parameters:
connection - the Connection handling the request.
tlh - the Traffic logger handler.
header - the request.
webheader - the response.
content - the resource.
mayCache - if the handler may cache the response.
mayFilter - if the handler may filter the response.
size - the Size of the data beeing handled (-1 = unknown length).
Returns:
the new Handler

setup

void setup(SProperties properties,
           HttpProxy proxy)
setup the handler factory.

Parameters:
properties - the properties for this factory
proxy - the HttpProxy using this HandlerFactory