|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.oaklandsw.http.CookiePolicy
Cookie management policy class. The cookie policy provides corresponding cookie management interfrace for a given type or version of cookie.
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:
Field Summary | |
static java.lang.String |
BROWSER_COMPATIBILITY
The policy that provides high degree of compatibility with common cookie management of popular HTTP agents. |
static java.lang.String |
DEFAULT
The default cookie policy. |
static java.lang.String |
IGNORE_COOKIES
The policy that ignores cookies. |
static java.lang.String |
NETSCAPE
The Netscape cookie draft compliant policy. |
static java.lang.String |
RFC_2109
The RFC 2109 compliant policy. |
Constructor Summary | |
CookiePolicy()
|
Method Summary | |
static CookieSpec |
getCookieSpec(java.lang.String id)
Gets the cookie specification with the given ID. |
static CookieSpec |
getDefaultSpec()
Returns cookie specification registered as
DEFAULT . |
static void |
registerCookieSpec(java.lang.String id,
java.lang.Class clazz)
Registers a new cookie specification with the given
identifier. |
static void |
unregisterCookieSpec(java.lang.String id)
Unregisters the cookie specification with the given
ID. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String BROWSER_COMPATIBILITY
public static final java.lang.String NETSCAPE
public static final java.lang.String RFC_2109
public static final java.lang.String IGNORE_COOKIES
public static final java.lang.String DEFAULT
Constructor Detail |
public CookiePolicy()
Method Detail |
public static void registerCookieSpec(java.lang.String id, java.lang.Class clazz)
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(String)
.
id
- the identifier for this specificationclazz
- the cookie specification
class to registergetCookieSpec(String)
public static void unregisterCookieSpec(java.lang.String id)
cookie specification
with the given
ID.
id
- the ID of the cookie specification
to
unregisterpublic static CookieSpec getCookieSpec(java.lang.String id) throws java.lang.IllegalStateException
cookie specification
with the given ID.
id
- the cookie specification
ID
cookie specification
java.lang.IllegalStateException
- if a policy with the ID cannot be foundpublic static CookieSpec getDefaultSpec()
cookie specification
registered as
DEFAULT
. If no default cookie specification
has been registered, RFC2109 specification
is
returned.
cookie specification
DEFAULT
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |