CookieHandler

public abstract class CookieHandler extends Object
Known Direct Subclasses

A CookieHandler object provides a callback mechanism to hook up a HTTP state management policy implementation into the HTTP protocol handler. The HTTP state management mechanism specifies a way to create a stateful session with HTTP requests and responses.

A system-wide CookieHandler that to used by the HTTP protocol handler can be registered by doing a CookieHandler.setDefault(CookieHandler). The currently registered CookieHandler can be retrieved by calling CookieHandler.getDefault(). For more information on HTTP state management, see RFC 2965: HTTP State Management Mechanism

Public Constructor Summary

Public Method Summary

abstract Map<StringList<String>>
get(URI uri, Map<StringList<String>> requestHeaders)
Gets all the applicable cookies from a cookie cache for the specified uri in the request header.
synchronized static CookieHandler
getDefault()
Gets the system-wide cookie handler.
abstract void
put(URI uri, Map<StringList<String>> responseHeaders)
Sets all the applicable cookies, examples are response header fields that are named Set-Cookie2, present in the response headers into a cookie cache.
synchronized static void
setDefault(CookieHandler cHandler)
Sets (or unsets) the system-wide cookie handler.

Inherited Method Summary