|
||||||||||
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, con, content, entry, mayCache, mayFilter, request, response, size, tlh, totalRead |
Constructor Summary | |
---|---|
FilterHandler()
Create a new FilterHandler that is uninitialized. |
|
FilterHandler(Connection con,
TrafficLoggerHandler tlh,
HttpHeader request,
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,
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,
HttpProxy proxy)
Setup this class. |
protected void |
setupHandler()
|
protected boolean |
willCompress()
|
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, 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, HttpHeader response, ResourceSource content, boolean mayCache, boolean mayFilter, long size, boolean compress, boolean repack, List<HtmlFilterFactory> filterClasses)
con
- the Connection handling the request.tlh
- the TrafficLoggerHandler to update with traffic informationrequest
- the actual request made.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.repack
- if true unpack, filter and possibly repack compressed
resources.filterClasses
- the filters to useMethod Detail |
---|
protected void setupHandler()
setupHandler
in class GZipHandler
protected boolean willCompress()
willCompress
in class GZipHandler
public Handler getNewInstance(Connection con, TrafficLoggerHandler tlh, HttpHeader header, HttpHeader webHeader, ResourceSource content, boolean mayCache, boolean mayFilter, long size)
HandlerFactory
getNewInstance
in interface HandlerFactory
getNewInstance
in class GZipHandler
con
- 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).
protected void writeDataToGZipper(byte[] arr)
GZipHandler
writeDataToGZipper
in class GZipHandler
arr
- the data to write to the gzip stream.protected void modifyBuffer(BufferHandle bufHandle)
GZipHandler
modifyBuffer
in class GZipHandler
bufHandle
- the handle to the buffer that just was read.public void blockSent()
BlockSentListener
blockSent
in interface BlockSentListener
blockSent
in class GZipHandler
protected void finishData()
BaseHandler
finishData
in class GZipHandler
public void setup(SProperties prop, HttpProxy proxy)
setup
in interface HandlerFactory
setup
in class GZipHandler
prop
- the properties of this class.proxy
- the HttpProxy using this HandlerFactory
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |