|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectrabbit.handler.BaseHandler
rabbit.handler.GZipHandler
rabbit.handler.FilterHandler
public class FilterHandler
This handler filters out unwanted html features.
| Field Summary |
|---|
| Fields inherited from class rabbit.handler.GZipHandler |
|---|
compress |
| Fields inherited from class rabbit.handler.BaseHandler |
|---|
cacheChannel, clientHandle, con, content, entry, mayCache, mayFilter, request, response, size, tlh, totalRead |
| Constructor Summary | |
|---|---|
FilterHandler()
|
|
FilterHandler(Connection con,
TrafficLoggerHandler tlh,
HttpHeader request,
BufferHandle clientHandle,
HttpHeader response,
ResourceSource content,
boolean mayCache,
boolean mayFilter,
long size,
boolean compress,
boolean repack,
List<HtmlFilterFactory> filterClasses)
Create a new FilterHandler for the given request. |
|
| Method Summary | |
|---|---|
void |
blockSent()
The http header has been sent. |
protected void |
finishData()
This method is used to finish the data for the resource being sent. |
Handler |
getNewInstance(Connection con,
TrafficLoggerHandler tlh,
HttpHeader header,
BufferHandle bufHandle,
HttpHeader webHeader,
ResourceSource content,
boolean mayCache,
boolean mayFilter,
long size)
Get a new Handler for the given request made. |
protected void |
modifyBuffer(BufferHandle bufHandle)
This method is used when we are not compressing data. |
void |
setup(SProperties prop)
Setup this class. |
protected void |
setupHandler()
|
protected boolean |
willCompress(HttpHeader request)
|
protected void |
writeDataToGZipper(byte[] arr)
Write the current block of data to the gzipper. |
| Methods inherited from class rabbit.handler.GZipHandler |
|---|
bufferRead, changesContentSize, mayTransfer, prepare, send, waitForData |
| Methods inherited from class rabbit.handler.BaseHandler |
|---|
addCache, deleteFile, failed, finish, finishedRead, getLogger, handle, httpHeaderSent, mayCacheFromSize, mayRestrictCacheSize, prepareStream, removeCache, send, sendHeader, setPartialContent, timeout, writeCache |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FilterHandler()
public FilterHandler(Connection con,
TrafficLoggerHandler tlh,
HttpHeader request,
BufferHandle clientHandle,
HttpHeader response,
ResourceSource content,
boolean mayCache,
boolean mayFilter,
long size,
boolean compress,
boolean repack,
List<HtmlFilterFactory> filterClasses)
con - the Connection handling the request.request - the actual request made.clientHandle - the client side buffer handle.response - the actual response.content - the resource.mayCache - May we cache this request?mayFilter - May we filter this request?size - the size of the data beeing handled.compress - if we want this handler to compress or not.| Method Detail |
|---|
protected void setupHandler()
setupHandler in class GZipHandlerprotected boolean willCompress(HttpHeader request)
willCompress in class GZipHandler
public Handler getNewInstance(Connection con,
TrafficLoggerHandler tlh,
HttpHeader header,
BufferHandle bufHandle,
HttpHeader webHeader,
ResourceSource content,
boolean mayCache,
boolean mayFilter,
long size)
HandlerFactory
getNewInstance in interface HandlerFactorygetNewInstance in class GZipHandlercon - the Connection handling the request.tlh - the Traffic logger handler.header - the request.bufHandle - the client side buffer handle (may contain the next 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).protected void writeDataToGZipper(byte[] arr)
GZipHandler
writeDataToGZipper in class GZipHandlerarr - the data to write to the gzip stream.protected void modifyBuffer(BufferHandle bufHandle)
GZipHandler
modifyBuffer in class GZipHandlerbufHandle - the handle to the buffer that just was read.public void blockSent()
BlockSentListener
blockSent in interface BlockSentListenerblockSent in class GZipHandlerprotected void finishData()
BaseHandler
finishData in class GZipHandlerpublic void setup(SProperties prop)
setup in interface HandlerFactorysetup in class GZipHandlerprop - the properties of this class.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||