org.apache.commons.httpclient.cookie
public abstract class CookiePolicy extends Object
RFC 2109 specification is used per default. Other supported specification can be chosen when appropriate or set default when desired
The following specifications are provided:
Since: 2.0
Field Summary | |
---|---|
static String | BROWSER_COMPATIBILITY
The policy that provides high degree of compatibilty
with common cookie management of popular HTTP agents.
|
static int | COMPATIBILITY
The COMPATIBILITY policy provides high compatibilty
with common cookie management of popular HTTP agents.
|
static String | DEFAULT
The default cookie policy.
|
static String | IGNORE_COOKIES
The policy that ignores cookies.
|
protected static Log | LOG Log object. |
static String | NETSCAPE
The Netscape cookie draft compliant policy.
|
static int | NETSCAPE_DRAFT
The NETSCAPE_DRAFT Netscape draft compliant policy.
|
static int | RFC2109
The RFC2109 RFC 2109 compliant policy.
|
static String | RFC_2109
The RFC 2109 compliant policy.
|
Method Summary | |
---|---|
static CookieSpec | getCompatibilitySpec() |
static CookieSpec | getCookieSpec(String id)
Gets the cookie specification with the given ID.
|
static int | getDefaultPolicy() |
static CookieSpec | getDefaultSpec()
Returns cookie specification registered as DEFAULT.
|
static CookieSpec | getSpecByPolicy(int policy) |
static CookieSpec | getSpecByVersion(int ver)
Gets the CookieSpec for a particular cookie version.
|
static void | registerCookieSpec(String id, Class clazz)
Registers a new cookie specification with the given identifier.
|
static void | setDefaultPolicy(int policy) |
static void | unregisterCookieSpec(String id)
Unregisters the cookie specification with the given ID.
|
Since: 3.0
Deprecated: Use BROWSER_COMPATIBILITY
The COMPATIBILITY policy provides high compatibilty with common cookie management of popular HTTP agents.Since: 3.0
Since: 3.0
Since: 3.0
Deprecated: Use NETSCAPE
The NETSCAPE_DRAFT Netscape draft compliant policy.Deprecated: Use RFC_2109
The RFC2109 RFC 2109 compliant policy.Since: 3.0
Deprecated: Use getCookieSpec
Returns: cookie specification interface that provides high compatibilty with common cookie management of popular HTTP agents
cookie specification
with the given ID.
Parameters: id the cookie specification
ID
Returns: cookie specification
Throws: IllegalStateException if a policy with the ID cannot be found
Since: 3.0
cookie specification
registered as DEFAULT.
If no default cookie specification
has been registered,
RFC2109 specification
is returned.
Returns: default cookie specification
See Also: DEFAULT
Deprecated: Use getCookieSpec
Parameters: policy cookie policy to get the CookieSpec for
Returns: cookie specification interface for the given policy
Deprecated: Use getCookieSpec
Gets the CookieSpec for a particular cookie version.Supported versions:
Parameters: ver the cookie version to get the spec for
Returns: cookie specification interface intended for processing cookies with the given version
cookie specification
with the given identifier.
If a specification with the given ID already exists it will be overridden.
This ID is the same one used to retrieve the cookie specification
from getCookieSpec.
Parameters: id the identifier for this specification clazz the cookie specification
class to register
Since: 3.0
cookie specification
with the given ID.
Parameters: id the ID of the cookie specification
to unregister
Since: 3.0