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

## rabbit.filter
Class DontCacheFilter

    java.lang.Object
      rabbit.filter.DontCacheFilter

All Implemented Interfaces:
  HTTPFilter

    public class DontCacheFilter

extends java.lang.Object
implements HTTPFilter

This is a class that makes sure the proxy doesnt caches certain pages. It features two types of filtering: either on the URL or the mime type.

URL based matching.
It uses the config option `dontCacheURLmatching` with a default value of the empty string. This value is considered a comma (',') separated list.
Matching is done with indexOf so no regular expressions are used for now.
This method should be used on requests, that is append this class to `httpinfilters` in `rabbit.conf` to use URL matching.

Mime type based matching.
It uses the config option `dontCacheMimematching` with a default value of the empty string. This value is considered a comma (',') separated list.
Matching is done with indexOf so no regular expressions are used for now.
This method should be used on responses, that is append this class to `httpoutfilters` in `rabbit.conf` to use mime type matching.

Constructor Summary
`DontCacheFilter()`

Method Summary
`HTTPHeader` | `doHTTPInFiltering(java.net.Socket socket, HTTPHeader header, Connection con)` Test if a socket/header combination is valid or return a new HTTPHeader.
`HTTPHeader` | `doHTTPOutFiltering(java.net.Socket socket, HTTPHeader header, Connection con)` Test if a socket/header combination is valid or return a new HTTPHeader.
`void` | `setup(Logger logger, 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

### DontCacheFilter

    public DontCacheFilter()

Method Detail

### doHTTPInFiltering

    public HTTPHeader doHTTPInFiltering(java.net.Socket 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 cache it. This filter is good for pages that done send cache-control headers correctly. (chat systems). This method uses the URL of the request to determine if the resource may be cached.

  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

### doHTTPOutFiltering

    public HTTPHeader doHTTPOutFiltering(java.net.Socket 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 cache it. This filter is good for pages that done send cache-control headers correctly. (chat systems). This method uses the mime type of the response to determine if the resource may be cached.

  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

### setup

    public void setup(Logger logger,
                      SProperties properties)

  Setup this class with the given properties.

  Specified by:
    `setup` in interface `HTTPFilter`
  Parameters:
    `logger` - the Logger for errors/warnings
    `properties` - the new configuration of this class.

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