Class CookieSpecBase
java.lang.Object
org.apache.hc.client5.http.impl.cookie.AbstractCookieSpec
org.apache.hc.client5.http.impl.cookie.CookieSpecBase
- All Implemented Interfaces:
CookieSpec
- Direct Known Subclasses:
IgnoreSpecSpec
Cookie management functions shared by all specification.
- Since:
- 4.0
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedprotectedCookieSpecBase(CommonCookieAttributeHandler... handlers) -
Method Summary
Modifier and TypeMethodDescriptionprotected static StringgetDefaultDomain(CookieOrigin origin) protected static StringgetDefaultPath(CookieOrigin origin) booleanmatch(Cookie cookie, CookieOrigin origin) Determines if a Cookie matches the target location.parse(org.apache.hc.core5.http.HeaderElement[] elems, CookieOrigin origin) voidvalidate(Cookie cookie, CookieOrigin origin) Validate the cookie according to validation rules defined by the cookie specification.Methods inherited from class org.apache.hc.client5.http.impl.cookie.AbstractCookieSpec
findAttribHandler, getAttribHandler, getAttribHandlersMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.hc.client5.http.cookie.CookieSpec
formatCookies, parse
-
Constructor Details
-
CookieSpecBase
public CookieSpecBase() -
CookieSpecBase
- Since:
- 4.4
-
CookieSpecBase
- Since:
- 4.4
-
-
Method Details
-
getDefaultPath
-
getDefaultDomain
-
parse
protected List<Cookie> parse(org.apache.hc.core5.http.HeaderElement[] elems, CookieOrigin origin) throws MalformedCookieException - Throws:
MalformedCookieException
-
validate
Description copied from interface:CookieSpecValidate the cookie according to validation rules defined by the cookie specification.- Parameters:
cookie- the Cookie to validateorigin- details of the cookie origin- Throws:
MalformedCookieException- if the cookie is invalid
-
match
Description copied from interface:CookieSpecDetermines if a Cookie matches the target location.- Parameters:
cookie- the Cookie to be matchedorigin- the target to test against- Returns:
trueif the cookie should be submitted with a request with given attributes,falseotherwise.
-