rabbit.filter
Interface HttpFilter

All Known Implementing Classes:
BlockFilter, DontCacheFilter, DontFilterFilter, HttpBaseFilter, HttpSnoop, NoGZipEncoding, ProxyAuth, RevalidateFilter, ReverseProxy, SetHeaderFilter, SQLBlockFilter

public interface HttpFilter

A filter for http headers.


Method Summary
 HttpHeader doConnectFiltering(SocketChannel socket, HttpHeader header, Connection con)
          Test if a socket/header combination is valid or return a new HttpHeader.
 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, HttpProxy proxy)
          Setup this filter.
 

Method Detail

doHttpInFiltering

HttpHeader doHttpInFiltering(SocketChannel socket,
                             HttpHeader header,
                             Connection con)
Test if a socket/header combination is valid or return a new HttpHeader.

Parameters:
socket - the Socket that made the request.
header - the actual request made.
con - the Connection handling the request.
Returns:
null if everything is fine or a HTTPHeader describing the error (like a 403).

doHttpOutFiltering

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

Parameters:
socket - the Socket that made the request.
header - the actual request made.
con - the Connection handling the request.
Returns:
null if everything is fine or a HTTPHeader describing the error (like a 403).

doConnectFiltering

HttpHeader doConnectFiltering(SocketChannel socket,
                              HttpHeader header,
                              Connection con)
Test if a socket/header combination is valid or return a new HttpHeader.

Parameters:
socket - the Socket that made the request.
header - the actual request made.
con - the Connection handling the request.
Returns:
null if everything is fine or a HTTPHeader describing the error (like a 403).

setup

void setup(SProperties properties,
           HttpProxy proxy)
Setup this filter.

Parameters:
properties - the SProperties to get the settings from.
proxy - the HttpProxy that is using this filter