| java.lang.Object org.apache.commons.httpclient.cookie.CookieSpecBase org.apache.commons.httpclient.cookie.RFC2965Spec
Field Summary | |
final public static String | SET_COOKIE2_KEY Cookie Response Header name for cookies processed
by this spec. |
Method Summary | |
public boolean | domainMatch(String host, String domain) Performs domain-match as defined by the RFC2965.
Host A's name domain-matches host B's if
their host name strings string-compare equal; or
A is a HDN string and has the form NB, where N is a non-empty
name string, B has the form .B', and B' is a HDN string. | protected CookieAttributeHandler | findAttribHandler(String name) Finds an attribute handler
CookieAttributeHandler for the
given attribute. | public String | formatCookie(Cookie cookie) | public String | formatCookies(Cookie[] cookies) | protected CookieAttributeHandler | getAttribHandler(String name) Gets attribute handler
CookieAttributeHandler for the
given attribute.
Parameters: name - attribute name. | protected Iterator | getAttribHandlerIterator() | public int | getVersion() | public Header | getVersionHeader() | public boolean | match(String host, int port, String path, boolean secure, Cookie cookie) Return true if the cookie should be submitted with a request
with given attributes, false otherwise. | public Cookie[] | parse(String host, int port, String path, boolean secure, Header header) Parses the Set-Cookie2 value into an array of Cookies. | public Cookie[] | parse(String host, int port, String path, boolean secure, String header) | public void | parseAttribute(NameValuePair attribute, Cookie cookie) Parse RFC 2965 specific cookie attribute and update the corresponsing
org.apache.commons.httpclient.Cookie properties. | protected void | registerAttribHandler(String name, CookieAttributeHandler handler) | public void | validate(String host, int port, String path, boolean secure, Cookie cookie) |
SET_COOKIE2_KEY | final public static String SET_COOKIE2_KEY(Code) | | Cookie Response Header name for cookies processed
by this spec.
|
RFC2965Spec | public RFC2965Spec()(Code) | | Default constructor
|
domainMatch | public boolean domainMatch(String host, String domain)(Code) | | Performs domain-match as defined by the RFC2965.
Host A's name domain-matches host B's if
their host name strings string-compare equal; or
A is a HDN string and has the form NB, where N is a non-empty
name string, B has the form .B', and B' is a HDN string. (So,
x.y.com domain-matches .Y.com but not Y.com.)
Parameters: host - host name where cookie is received from or being sent to. Parameters: domain - The cookie domain attribute. true if the specified host matches the given domain. |
findAttribHandler | protected CookieAttributeHandler findAttribHandler(String name)(Code) | | Finds an attribute handler
CookieAttributeHandler for the
given attribute. Returns null if no attribute handler is
found for the specified attribute.
Parameters: name - attribute name. e.g. Domain, Path, etc. an attribute handler or null |
formatCookie | public String formatCookie(Cookie cookie)(Code) | | Return a string suitable for sending in a "Cookie" header as
defined in RFC 2965
Parameters: cookie - a org.apache.commons.httpclient.Cookie to be formatted as string a string suitable for sending in a "Cookie" header. |
getAttribHandlerIterator | protected Iterator getAttribHandlerIterator()(Code) | | |
getVersion | public int getVersion()(Code) | | |
match | public boolean match(String host, int port, String path, boolean secure, Cookie cookie)(Code) | | Return true if the cookie should be submitted with a request
with given attributes, false otherwise.
Parameters: host - the host to which the request is being submitted Parameters: port - the port to which the request is being submitted (ignored) Parameters: path - the path to which the request is being submitted Parameters: secure - true if the request is using a secure connection true if the cookie matches the criterium |
parse | public Cookie[] parse(String host, int port, String path, boolean secure, Header header) throws MalformedCookieException(Code) | | Parses the Set-Cookie2 value into an array of Cookies.
The syntax for the Set-Cookie2 response header is:
set-cookie = "Set-Cookie2:" cookies
cookies = 1#cookie
cookie = NAME "=" VALUE * (";" cookie-av)
NAME = attr
VALUE = value
cookie-av = "Comment" "=" value
| "CommentURL" "=" <"> http_URL <">
| "Discard"
| "Domain" "=" value
| "Max-Age" "=" value
| "Path" "=" value
| "Port" [ "=" <"> portlist <"> ]
| "Secure"
| "Version" "=" 1*DIGIT
portlist = 1#portnum
portnum = 1*DIGIT
Parameters: host - the host from which the Set-Cookie2 value wasreceived Parameters: port - the port from which the Set-Cookie2 value wasreceived Parameters: path - the path from which the Set-Cookie2 value wasreceived Parameters: secure - true when the Set-Cookie2 value wasreceived over secure conection Parameters: header - the Set-Cookie2 Header received from the server an array of Cookies parsed from the Set-Cookie2 value throws: MalformedCookieException - if an exception occurs during parsing |
Fields inherited from org.apache.commons.httpclient.cookie.CookieSpecBase | final protected static Log LOG(Code)(Java Doc)
|
Methods inherited from org.apache.commons.httpclient.cookie.CookieSpecBase | public boolean domainMatch(String host, String domain)(Code)(Java Doc) public String formatCookie(Cookie cookie)(Code)(Java Doc) public Header formatCookieHeader(Cookie[] cookies)(Code)(Java Doc) public Header formatCookieHeader(Cookie cookie)(Code)(Java Doc) public String formatCookies(Cookie[] cookies) throws IllegalArgumentException(Code)(Java Doc) public Collection getValidDateFormats()(Code)(Java Doc) public boolean match(String host, int port, String path, boolean secure, Cookie cookie)(Code)(Java Doc) public Cookie[] match(String host, int port, String path, boolean secure, Cookie cookies)(Code)(Java Doc) public Cookie[] parse(String host, int port, String path, boolean secure, String header) throws MalformedCookieException(Code)(Java Doc) public Cookie[] parse(String host, int port, String path, boolean secure, Header header) throws MalformedCookieException(Code)(Java Doc) public void parseAttribute(NameValuePair attribute, Cookie cookie) throws MalformedCookieException(Code)(Java Doc) public boolean pathMatch(String path, String topmostPath)(Code)(Java Doc) public void setValidDateFormats(Collection datepatterns)(Code)(Java Doc) public void validate(String host, int port, String path, boolean secure, Cookie cookie) throws MalformedCookieException(Code)(Java Doc)
|
|
|