HttpBaseFilter (RabbIT/4)
Date: 2009-12-20

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## rabbit.filter
Class HttpBaseFilter

    java.lang.Object
      rabbit.filter.HttpBaseFilter

All Implemented Interfaces:
  HttpFilter

    public class HttpBaseFilter

extends Object
implements HttpFilter

This is a class that filter http headers to make them nice. This filter sets up username and password if supplied and also sets up keepalive.

Author:
  Robert Olofsson

Field Summary
`static String` | `NOPROXY`

Constructor Summary
`HttpBaseFilter()`

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.
`boolean` | `isPublic(URL url)` Check if a given url is a public URL of the Proxy.
`void` | `setup(SProperties properties)` Setup this filter.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### NOPROXY

    public static final String NOPROXY

See Also:
  Constant Field Values

Constructor Detail

### HttpBaseFilter

    public HttpBaseFilter()

Method Detail

### doHttpInFiltering

    public HttpHeader doHttpInFiltering(SocketChannel socket,
                                        HttpHeader header,
                                        Connection con)

  Description copied from interface: `HttpFilter`
  test if a socket/header combination is valid or return a new HttpHeader.

  Specified by:
    `doHttpInFiltering` in interface `HttpFilter`
  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

    public HttpHeader doHttpOutFiltering(SocketChannel socket,
                                         HttpHeader header,
                                         Connection con)

  Description copied from interface: `HttpFilter`
  test if a socket/header combination is valid or return a new HttpHeader.

  Specified by:
    `doHttpOutFiltering` in interface `HttpFilter`
  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

    public void setup(SProperties properties)

  Description copied from interface: `HttpFilter`
  Setup this filter.

  Specified by:
    `setup` in interface `HttpFilter`
  Parameters:
    `properties` - the SProperties to get the settings from.

### isPublic

    public boolean isPublic(URL url)

  Check if a given url is a public URL of the Proxy.

  Parameters:
    `url` - the URL to check.
  Returns:
    true if this url has public access, false otherwise.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD