@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)
确定Cookie是否与目标位置匹配。
|
protected List<Cookie> |
parse(HeaderElement[] elems, CookieOrigin origin) |
void |
validate(Cookie cookie, CookieOrigin origin)
根据cookie规范定义的验证规则验证cookie。
|
findAttribHandler, getAttribHandler, getAttribHandlers, registerAttribHandlerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitformatCookies, getVersion, getVersionHeader, parsepublic 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(HeaderElement[] elems, CookieOrigin origin) throws MalformedCookieException
public void validate(Cookie cookie, CookieOrigin origin) throws MalformedCookieException
CookieSpec复制
cookie - 要验证的Cookie
origin - 饼干起源的细节
MalformedCookieException - 如果cookie无效
public boolean match(Cookie cookie, CookieOrigin origin)
CookieSpec复制
cookie - 要匹配的Cookie
origin - 测试对象的目标
true if the cookie should be submitted with a request with given attributes,
false otherwise.
Copyright © 1999–2017 The Apache Software Foundation. All rights reserved.