gnu.inet.http
Class SimpleCookieManager

java.lang.Object
  extended by gnu.inet.http.SimpleCookieManager
All Implemented Interfaces:
CookieManager

public class SimpleCookieManager
extends java.lang.Object
implements CookieManager

A simple non-persistent cookie manager. This class can be extended to provide cookie persistence.

Author:
Chris Burdess

Field Summary
protected  java.util.Map cookies
          The cookie cache.
 
Constructor Summary
SimpleCookieManager()
          Constructor.
 
Method Summary
 Cookie[] getCookies(java.lang.String host, boolean secure, java.lang.String path)
          Retrieves the cookies matching the specified criteria.
 void setCookie(Cookie cookie)
          Stores a cookie in the cookie manager.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cookies

protected java.util.Map cookies
The cookie cache. This is a dictionary mapping domains to maps of cookies by name.

Constructor Detail

SimpleCookieManager

public SimpleCookieManager()
Constructor.

Method Detail

setCookie

public void setCookie(Cookie cookie)
Description copied from interface: CookieManager
Stores a cookie in the cookie manager.

Specified by:
setCookie in interface CookieManager
Parameters:
cookie - the cookie to store

getCookies

public Cookie[] getCookies(java.lang.String host,
                           boolean secure,
                           java.lang.String path)
Description copied from interface: CookieManager
Retrieves the cookies matching the specified criteria.

Specified by:
getCookies in interface CookieManager
Parameters:
host - the host name
secure - whether the connection is secure
path - the path to access


© Copyright 2003 The Free Software Foundation, all rights reserved