public abstract class CookieSpecBase extends AbstractCookieSpec
| Modifier | Constructor and Description |
|---|---|
|
CookieSpecBase() |
protected |
CookieSpecBase(CommonCookieAttributeHandler... handlers) |
protected |
CookieSpecBase(java.util.HashMap<java.lang.String,CookieAttributeHandler> map) |
| Modifier and Type | Method and Description |
|---|---|
protected static java.lang.String |
getDefaultDomain(CookieOrigin origin) |
protected static java.lang.String |
getDefaultPath(CookieOrigin origin) |
boolean |
match(Cookie cookie,
CookieOrigin origin)
Determines if a Cookie matches the target location.
|
protected java.util.List<Cookie> |
parse(HeaderElement[] elems,
CookieOrigin origin)
Parse the
"Set-Cookie" Header into an array of Cookies. |
void |
validate(Cookie cookie,
CookieOrigin origin)
Validate the cookie according to validation rules defined by the
cookie specification.
|
findAttribHandler, getAttribHandler, getAttribHandlers, registerAttribHandlerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitformatCookies, getVersion, getVersionHeaderpublic CookieSpecBase()
protected CookieSpecBase(java.util.HashMap<java.lang.String,CookieAttributeHandler> map)
protected CookieSpecBase(CommonCookieAttributeHandler... handlers)
protected static java.lang.String getDefaultPath(CookieOrigin origin)
protected static java.lang.String getDefaultDomain(CookieOrigin origin)
protected java.util.List<Cookie> parse(HeaderElement[] elems, CookieOrigin origin) throws MalformedCookieException
CookieSpec"Set-Cookie" Header into an array of Cookies.
This method will not perform the validation of the resultant
Cookies
elems - the Set-Cookie received from the serverorigin - details of the cookie originCookies parsed from the headerMalformedCookieException - if an exception occurs during parsingCookieSpec.validate(org.apache.http.cookie.Cookie, org.apache.http.cookie.CookieOrigin)public void validate(Cookie cookie, CookieOrigin origin) throws MalformedCookieException
CookieSpeccookie - the Cookie to validateorigin - details of the cookie originMalformedCookieException - if the cookie is invalidpublic boolean match(Cookie cookie, CookieOrigin origin)
CookieSpeccookie - the Cookie to be matchedorigin - the target to test againsttrue if the cookie should be submitted with a request
with given attributes, false otherwise.