|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.http.impl.cookie.BestMatchSpec
public class BestMatchSpec
'Meta' cookie specification that selects a cookie policy depending on the format of the cookie(s)
Constructor Summary | |
---|---|
BestMatchSpec()
|
|
BestMatchSpec(java.lang.String[] datepatterns,
boolean oneHeader)
|
Method Summary | |
---|---|
java.util.List<org.apache.http.Header> |
formatCookies(java.util.List<Cookie> cookies)
Create "Cookie" headers for an array of Cookies. |
int |
getVersion()
Returns version of the state management this cookie specification conforms to. |
org.apache.http.Header |
getVersionHeader()
Returns a request header identifying what version of the state management specification is understood. |
boolean |
match(Cookie cookie,
CookieOrigin origin)
Determines if a Cookie matches the target location. |
java.util.List<Cookie> |
parse(org.apache.http.Header header,
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BestMatchSpec(java.lang.String[] datepatterns, boolean oneHeader)
public BestMatchSpec()
Method Detail |
---|
public java.util.List<Cookie> parse(org.apache.http.Header header, CookieOrigin origin) throws MalformedCookieException
CookieSpec
This method will not perform the validation of the resultant
Cookie
s
parse
in interface CookieSpec
header
- the Set-Cookie received from the serverorigin
- details of the cookie origin
MalformedCookieException
- 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
CookieSpec
validate
in interface CookieSpec
cookie
- the Cookie to validateorigin
- details of the cookie origin
MalformedCookieException
- if the cookie is invalidpublic boolean match(Cookie cookie, CookieOrigin origin)
CookieSpec
match
in interface CookieSpec
cookie
- the Cookie to be matchedorigin
- the target to test against
public java.util.List<org.apache.http.Header> formatCookies(java.util.List<Cookie> cookies)
CookieSpec
formatCookies
in interface CookieSpec
cookies
- the Cookies format into a Cookie header
public int getVersion()
CookieSpec
getVersion
in interface CookieSpec
public org.apache.http.Header getVersionHeader()
CookieSpec
null
if the cookie
specification does not support Cookie2 header.
getVersionHeader
in interface CookieSpec
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |