rabbit.handler
Class MultiPartHandler
java.lang.Object
rabbit.handler.BaseHandler
rabbit.handler.MultiPartHandler
- All Implemented Interfaces:
- Handler, HandlerFactory, Logger
public class MultiPartHandler
- extends BaseHandler
This class handles multipart responses, this handler does not
filter the resource.
| Methods inherited from class rabbit.handler.BaseHandler |
addCacheStream, clientStreamHasCache, finish, finishStream, getFactory, handle, logError, logError, mayCacheFromSize, mayRestrictCacheSize, prepareStream, removeCache, setPartialContent, setup, writeData, writeHeader |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MultiPartHandler
public MultiPartHandler()
MultiPartHandler
public MultiPartHandler(Connection con,
HTTPHeader request,
HTTPHeader response,
HTTPInputStream contentstream,
MultiOutputStream clientstream,
boolean maycache,
boolean mayfilter,
long size)
- Create a new BaseHansler for the given request.
- Parameters:
con - the Connection handling the request.request - the actual request made.response - the actual response.contentstream - the stream to read data from.clientstream - the stream to write data to.maycache - May we cache this request?mayfilter - May we filter this request?size - the size of the data beeing handled.
getNewInstance
public Handler getNewInstance(Connection connection,
HTTPHeader header,
HTTPHeader webheader,
HTTPInputStream contentStream,
MultiOutputStream out,
boolean maycache,
boolean mayfilter,
long size)
- Description copied from interface:
HandlerFactory
- Get a new Handler for the given request made.
- Specified by:
getNewInstance in interface HandlerFactory- Overrides:
getNewInstance in class BaseHandler
- Parameters:
connection - the Connection handling the request.header - the request.webheader - the response.contentStream - the data to read.out - the client (and possibly the cache).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).
send
protected void send()
throws java.io.IOException
- Description copied from class:
BaseHandler
- Send the actual data.
- Overrides:
send in class BaseHandler
- Throws:
java.io.IOException - if reading or writing of the data fails.