|
|||||||||
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 | |
---|---|
protected static java.lang.String |
ADREPLACER
the image we replace ads with |
Fields inherited from class rabbit.filter.HTMLFilter |
---|
con, request, response |
Constructor Summary | |
---|---|
AdFilter()
|
|
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(java.lang.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 java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final java.lang.String ADREPLACER
Constructor Detail |
---|
public AdFilter()
public AdFilter(Connection con, HTTPHeader request, HTTPHeader response)
request
- the actual request made.response
- the actual response being sent.Method Detail |
---|
public HTMLFilter newFilter(Connection con, HTTPHeader request, HTTPHeader response)
HTMLFilter
newFilter
in interface HTMLFilterFactory
newFilter
in class HTMLFilter
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(java.lang.String str)
str
- the String to check.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |