|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectrabbit.filter.HtmlFilter
rabbit.filter.AdFilter
public class AdFilter
This class switches advertising images into another image.
Field Summary |
---|
Fields inherited from class rabbit.filter.HtmlFilter |
---|
con, request, response |
Constructor Summary | |
---|---|
AdFilter()
Create a new AdFilter factory |
|
AdFilter(Connection con,
HttpHeader request,
HttpHeader response)
Create a new AdFilter for the given request, response pair. |
Method Summary | |
---|---|
void |
filterHtml(HtmlBlock block)
Removes advertising from the given block. |
boolean |
isEvil(String str)
Check if a string is evil (that is its probably advertising). |
HtmlFilter |
newFilter(Connection con,
HttpHeader request,
HttpHeader response)
Get a new HtmlFilter for the given request, response pair. |
Methods inherited from class rabbit.filter.HtmlFilter |
---|
isCacheable |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AdFilter()
public AdFilter(Connection con, HttpHeader request, HttpHeader response)
con
- the Connection handling the requestrequest
- the actual request made.response
- the actual response being sent.Method Detail |
---|
public HtmlFilter newFilter(Connection con, HttpHeader request, HttpHeader response)
HtmlFilterFactory
con
- the Connection handling the request.request
- the actual request made.response
- the actual response being sent.
public void filterHtml(HtmlBlock block)
filterHtml
in class HtmlFilter
block
- the part of the html page we are filtering.public boolean isEvil(String str)
str
- the String to check.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |