Module java.base
Package java.net

Class CookieHandler

java.lang.Object
java.net.CookieHandler
Direct Known Subclasses:
CookieManager

public abstract class CookieHandler extends Object
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 to be used by the HTTP URL stream 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

Since:
1.5
External Specifications