Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
org.apache.commons.httpclient.cookie.CookiePolicy
public abstract class CookiePolicy
extends java.lang.Object
Field Summary | |
static String |
|
static int |
|
static String |
|
static String |
|
protected static Log |
|
static String |
|
static int |
|
static int | |
static String |
|
Method Summary | |
static CookieSpec |
|
static CookieSpec |
|
static int |
|
static CookieSpec |
|
static CookieSpec |
|
static CookieSpec |
|
static void |
|
static void |
|
static void |
|
public static final String BROWSER_COMPATIBILITY
The policy that provides high degree of compatibilty with common cookie management of popular HTTP agents.
- Since:
- 3.0
public static final int COMPATIBILITY
Deprecated. Use
BROWSER_COMPATIBILITY
The COMPATIBILITY policy provides high compatibilty with common cookie management of popular HTTP agents.
- Field Value:
- 0
public static final String DEFAULT
The default cookie policy.
- Since:
- 3.0
public static final String IGNORE_COOKIES
The policy that ignores cookies.
- Since:
- 3.0
protected static final Log LOG
Log object.
public static final String NETSCAPE
The Netscape cookie draft compliant policy.
- Since:
- 3.0
public static final int NETSCAPE_DRAFT
Deprecated. Use
NETSCAPE
The NETSCAPE_DRAFT Netscape draft compliant policy.
- Field Value:
- 1
public static final int RFC2109
Deprecated. Use
RFC_2109
The RFC2109 RFC 2109 compliant policy.
- Field Value:
- 2
public static final String RFC_2109
The RFC 2109 compliant policy.
- Since:
- 3.0
public static CookieSpec getCompatibilitySpec()
Deprecated. Use
getCookieSpec(String)
- Returns:
- cookie specification interface that provides high compatibilty with common cookie management of popular HTTP agents
public static CookieSpec getCookieSpec(String id) throws IllegalStateException
Gets thecookie specification
with the given ID.
- Parameters:
id
- thecookie specification
ID
- Returns:
cookie specification
- Since:
- 3.0
public static int getDefaultPolicy()
Deprecated. Use
getDefaultSpec()
- Returns:
- default cookie policy
- See Also:
getDefaultSpec()
public static CookieSpec getDefaultSpec()
Returnscookie specification
registered asDEFAULT
. If no defaultcookie specification
has been registered,RFC2109 specification
is returned.
- Returns:
- default
cookie specification
- See Also:
DEFAULT
public static CookieSpec getSpecByPolicy(int policy)
Deprecated. Use
getCookieSpec(String)
- Parameters:
policy
- cookie policy to get the CookieSpec for
- Returns:
- cookie specification interface for the given policy
public static CookieSpec getSpecByVersion(int ver)
Deprecated. Use
getCookieSpec(String)
Gets the CookieSpec for a particular cookie version. Supported versions:
- version 0 corresponds to the Netscape draft
- version 1 corresponds to the RFC 2109
- Any other cookie value coresponds to the default spec
- Parameters:
ver
- the cookie version to get the spec for
- Returns:
- cookie specification interface intended for processing cookies with the given version
public static void registerCookieSpec(String id, Class clazz)
Registers a newcookie 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 thecookie specification
fromgetCookieSpec(String)
.
- Parameters:
id
- the identifier for this specificationclazz
- thecookie specification
class to register
- Since:
- 3.0
- See Also:
getCookieSpec(String)
public static void setDefaultPolicy(int policy)
Deprecated. Use
registerCookieSpec(String,Class)
- Parameters:
policy
- new default cookie policy
- See Also:
DEFAULT
public static void unregisterCookieSpec(String id)
Unregisters thecookie specification
with the given ID.
- Parameters:
id
- the ID of thecookie specification
to unregister
- Since:
- 3.0