rabbit.filter
Class DontFilterFilter

java.lang.Object
  extended by rabbit.filter.DontFilterFilter
All Implemented Interfaces:
HttpFilter

public class DontFilterFilter
extends Object
implements HttpFilter

This is a class that makes sure the proxy doesnt filter certain pages. It matches pages based on the URL.

It uses the config option dontFilterURLmatching with a default value of the empty string.
Matching is done with regular expressions, using find on the url.

Author:
Robert Olofsson

Constructor Summary
DontFilterFilter()
          Create a new Filter.
 
Method Summary
 HttpHeader doHttpInFiltering(SocketChannel socket, HttpHeader header, Connection con)
          Test if a socket/header combination is valid or return a new HttpHeader.
 HttpHeader doHttpOutFiltering(SocketChannel socket, HttpHeader header, Connection con)
          test if a socket/header combination is valid or return a new HttpHeader.
 void setup(SProperties properties)
          Setup this class with the given properties.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DontFilterFilter

public DontFilterFilter()
Create a new Filter.

Method Detail

doHttpInFiltering

public HttpHeader doHttpInFiltering(SocketChannel socket,
                                    HttpHeader header,
                                    Connection con)
Test if a socket/header combination is valid or return a new HttpHeader. If the request matches a certain criteria dont filter it. This filter is good for pages with broken HTML that would wreck the HTML parser.

Specified by:
doHttpInFiltering in interface HttpFilter
Parameters:
socket - the SocketChannel that made the request.
header - the actual request made.
con - the Connection handling the request.
Returns:
This filter always returns null

doHttpOutFiltering

public HttpHeader doHttpOutFiltering(SocketChannel socket,
                                     HttpHeader header,
                                     Connection con)
test if a socket/header combination is valid or return a new HttpHeader.

Specified by:
doHttpOutFiltering in interface HttpFilter
Parameters:
socket - the SocketChannel that made the request.
header - the actual request made.
con - the Connection handling the request.
Returns:
This filter always returns null

setup

public void setup(SProperties properties)
Setup this class with the given properties.

Specified by:
setup in interface HttpFilter
Parameters:
properties - the new configuration of this class.