## org.w3c.www.protocol.http.cookies
Class CookieFilter

    java.lang.Object
      |
      +--org.w3c.www.protocol.http.cookies.CookieFilter

public class CookieFilter
extends java.lang.Object
implements PropRequestFilter

Client side CookieFilter :

Field Summary
`static java.lang.String` | `COOKIES_FILE_P` The absolute Path of the file use to store cookies.
`protected HttpManager` | `manager`

Constructor Summary
`CookieFilter()`

Method Summary
`boolean` | `exceptionFilter(Request request, HttpException ex)` An exception occured while talking to target server.
`Reply` | `ingoingFilter(Request request)` The request pre-processing hook.
`void` | `initialize(HttpManager manager)` Initialize this filter, using the provided manager.
`Reply` | `outgoingFilter(Request request, Reply reply)` The request post-processing hook.
`void` | `sync()` Synchronized any pending state into stable storage.

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

Field Detail

### COOKIES_FILE_P

    public static final java.lang.String COOKIES_FILE_P

  The absolute Path of the file use to store cookies.

### manager

    protected HttpManager manager

Constructor Detail

### CookieFilter

    public CookieFilter()

Method Detail

### ingoingFilter

    public Reply ingoingFilter(Request request)
                        throws HttpException

  The request pre-processing hook. Before each request is launched, all filters will be called back through this method. They will generally set up additional request header fields to enhance the request.
  Parameters:
    `request` - The request that is about to be launched.
  Returns:
    An instance of Reply if the filter could handle the request, or null if processing should continue normally.
  Throws:
    HttpException - If the filter is supposed to fulfill the request, but some error happened during that processing.

### outgoingFilter

    public Reply outgoingFilter(Request request,
                                Reply reply)
                         throws HttpException

  The request post-processing hook. After each request has been replied to by the target server (be it a proxy or the actual origin server), each filter's outgoingFilter method is called.

  It gets the original request, and the actual reply as a parameter, and should return whatever reply it wants the caller to get.

  Parameters:
    `request` - The original (handled) request.
    `reply` - The reply, as emited by the target server, or constructed by some other filter.
  Throws:
    HttpException - If the reply emitted by the server is not a valid HTTP reply.

### exceptionFilter

    public boolean exceptionFilter(Request request,
                                   HttpException ex)

  An exception occured while talking to target server. This method is triggered by the HttpManager, when the target server (which can be a proxy for that request) was not reachable, or some network error occured while emitting the request or reading the reply headers.
  Parameters:
    `request` - The request whose processing triggered the exception.
    `ex` - The exception that was triggered.
  Returns:
    A boolean, true if that filter did influence the target server used to fulfill the request, and it has fixed the problem in such a way that the request should be retried.

### sync

    public void sync()

  Synchronized any pending state into stable storage. If the filter maintains some in-memory cached state, this method should ensure that cached data are saved to stable storage.

### initialize

    public void initialize(HttpManager manager)
                    throws PropRequestFilterException

  Initialize this filter, using the provided manager. During initialization, it is up to the filter to install itself in the manager, by invoking the appropriate `setFilter` method.
  Specified by:
    initialize in interface PropRequestFilter
  Parameters:
    `manager` - The HttpManager initializing the filter.
  Throws:
    PropRequestFilterException - If the filter couldn't be initialized properly.