@Contract(threading=SAFE) public abstract class CookieSpecBase extends AbstractCookieSpec
Modifier | Constructor and Description |
---|---|
|
CookieSpecBase() |
protected |
CookieSpecBase(CommonCookieAttributeHandler... handlers) |
protected |
CookieSpecBase(HashMap<String,CookieAttributeHandler> map) |
Modifier and Type | Method and Description |
---|---|
protected static String |
getDefaultDomain(CookieOrigin origin) |
protected static String |
getDefaultPath(CookieOrigin origin) |
boolean |
match(Cookie cookie,
CookieOrigin origin)
Determines if a Cookie matches the target location.
|
protected List<Cookie> |
parse(org.apache.hc.core5.http.HeaderElement[] elems,
CookieOrigin origin) |
void |
validate(Cookie cookie,
CookieOrigin origin)
Validate the cookie according to validation rules defined by the
cookie specification.
|
findAttribHandler, getAttribHandler, getAttribHandlers
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
formatCookies, parse
public CookieSpecBase()
protected CookieSpecBase(HashMap<String,CookieAttributeHandler> map)
protected CookieSpecBase(CommonCookieAttributeHandler... handlers)
protected static String getDefaultPath(CookieOrigin origin)
protected static String getDefaultDomain(CookieOrigin origin)
protected List<Cookie> parse(org.apache.hc.core5.http.HeaderElement[] elems, CookieOrigin origin) throws MalformedCookieException
MalformedCookieException
public void validate(Cookie cookie, CookieOrigin origin) throws MalformedCookieException
CookieSpec
cookie
- the Cookie to validateorigin
- details of the cookie originMalformedCookieException
- if the cookie is invalidpublic boolean match(Cookie cookie, CookieOrigin origin)
CookieSpec
cookie
- the Cookie to be matchedorigin
- the target to test againsttrue
if the cookie should be submitted with a request
with given attributes, false
otherwise.Copyright © 1999–2021 The Apache Software Foundation. All rights reserved.