Top Description Fields Constructors Methods
org.eclipse.jetty.http

public Class CookieCache

extends Object
implements Handler, Listener
Class Inheritance
All Implemented Interfaces
org.eclipse.jetty.http.ComplianceViolation.Listener, org.eclipse.jetty.http.CookieParser.Handler
Imports
java.util.ArrayList, .Collections, .HashMap, .List, .ListIterator, .Map, org.eclipse.jetty.util.StringUtil, org.slf4j.Logger, .LoggerFactory

Cookie parser

Optimized stateful cookie parser. If the added fields are identical to those last added (as strings), then the cookies are not re-parsed.

Field Summary

Modifier and TypeField and Description
protected List<HttpCookie>
private final CookieParser
protected final List<String>
private List<ComplianceViolation.Event>
protected static final Logger

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
public void
addCookie(String cookieName, String cookieValue, int cookieVersion, String cookieDomain, String cookiePath, String cookieComment)

Implements org.eclipse.jetty.http.CookieParser.Handler.addCookie.

public List<HttpCookie>
public List<HttpCookie>
getCookies(HttpFields headers, ComplianceViolation.Listener complianceViolationListener)

public void
onComplianceViolation(ComplianceViolation.Event
the compliance violation event
event
)

Overrides default org.eclipse.jetty.http.ComplianceViolation.Listener.onComplianceViolation.

The compliance violation event.
public void
replaceCookieList(List<HttpCookie>
The replacement cookie list, which must be equal to the existing list
cookies
)

Replace the cookie list with

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

_cookieListback to summary
protected List<HttpCookie> _cookieList
_parserback to summary
private final CookieParser _parser
_rawFieldsback to summary
protected final List<String> _rawFields
_violationsback to summary
private List<ComplianceViolation.Event> _violations
LOGback to summary
protected static final Logger LOG

Constructor Detail

CookieCacheback to summary
public CookieCache()
CookieCacheback to summary
public CookieCache(CookieCompliance compliance)

Method Detail

addCookieback to summary
public void addCookie(String cookieName, String cookieValue, int cookieVersion, String cookieDomain, String cookiePath, String cookieComment)

Implements org.eclipse.jetty.http.CookieParser.Handler.addCookie.

Annotations
@Override
getCookiesback to summary
public List<HttpCookie> getCookies(HttpFields headers)
getCookiesback to summary
public List<HttpCookie> getCookies(HttpFields headers, ComplianceViolation.Listener complianceViolationListener)
onComplianceViolationback to summary
public void onComplianceViolation(ComplianceViolation.Event event)

Overrides default org.eclipse.jetty.http.ComplianceViolation.Listener.onComplianceViolation.

Doc from org.eclipse.jetty.http.ComplianceViolation.Listener.onComplianceViolation.

The compliance violation event.

Parameters
event:ComplianceViolation.Event

the compliance violation event

Annotations
@Override
replaceCookieListback to summary
public void replaceCookieList(List<HttpCookie> cookies)

Replace the cookie list with

Parameters
cookies:List<HttpCookie>

The replacement cookie list, which must be equal to the existing list