rabbit.filter
Class HtmlFilter

java.lang.Object
  extended by rabbit.filter.HtmlFilter
All Implemented Interfaces:
HtmlFilterFactory
Direct Known Subclasses:
AdFilter, SimpleTagFilter

public abstract class HtmlFilter
extends Object
implements HtmlFilterFactory

This class describes the functions neccessary to filter a block of html.

Author:
Robert Olofsson

Field Summary
protected  Connection con
          The Connection handling the request.
protected  HttpHeader request
          The actual request made.
protected  HttpHeader response
          The actual response.
 
Constructor Summary
HtmlFilter()
          Create the factory.
HtmlFilter(Connection con, HttpHeader request, HttpHeader response)
          Create a new HtmlFilter for the given request, response pair.
 
Method Summary
abstract  void filterHtml(HtmlBlock block)
          Filter a block of html.
 boolean isCacheable()
          If the filter determines that the page is not cacheable it can negate this, and FilterHandler will not cache it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface rabbit.filter.HtmlFilterFactory
newFilter
 

Field Detail

con

protected Connection con
The Connection handling the request.


request

protected HttpHeader request
The actual request made.


response

protected HttpHeader response
The actual response.

Constructor Detail

HtmlFilter

public HtmlFilter()
Create the factory.


HtmlFilter

public HtmlFilter(Connection con,
                  HttpHeader request,
                  HttpHeader response)
Create a new HtmlFilter for the given request, response pair.

Parameters:
request - the actual request made.
response - the actual response being sent.
Method Detail

filterHtml

public abstract void filterHtml(HtmlBlock block)
Filter a block of html.

Parameters:
block - the part of the html page to filter.

isCacheable

public boolean isCacheable()
If the filter determines that the page is not cacheable it can negate this, and FilterHandler will not cache it. This method returns true, override in sub classes when needed.