| org.apache.commons.httpclient.cookie.CookieSpec
All known Subclasses: org.apache.commons.httpclient.cookie.CookieSpecBase, org.apache.commons.httpclient.cookie.IgnoreCookiesSpec,
CookieSpec | public interface CookieSpec (Code) | | Defines the cookie management specification.
Cookie management specification must define
- rules of parsing "Set-Cookie" header
- rules of validation of parsed cookies
- formatting of "Cookie" header
for a given host, port and path of origin
author: Oleg Kalnichevski author: Jeff Dever since: 2.0 |
Method Summary | |
boolean | domainMatch(String host, String domain) Performs domain-match as defined by the cookie specification.
Parameters: host - The target host. Parameters: domain - The cookie domain attribute. | String | formatCookie(Cookie cookie) Create a "Cookie" header value for an array of cookies. | Header | formatCookieHeader(Cookie[] cookies) Create a "Cookie" Header for an array of Cookies. | Header | formatCookieHeader(Cookie cookie) Create a "Cookie" Header for single Cookie. | String | formatCookies(Cookie[] cookies) Create a "Cookie" header value for an array of cookies. | Collection | getValidDateFormats() Returns the
Collection of date patterns used for parsing. | boolean | match(String host, int port, String path, boolean secure, Cookie cookie) Determines if a Cookie matches a location. | Cookie[] | match(String host, int port, String path, boolean secure, Cookie cookies) Determines which of an array of Cookies matches a location. | Cookie[] | parse(String host, int port, String path, boolean secure, String header) Parse the "Set-Cookie" header value into Cookie array. | Cookie[] | parse(String host, int port, String path, boolean secure, Header header) Parse the "Set-Cookie" Header into an array of Cookies. | void | parseAttribute(NameValuePair attribute, Cookie cookie) Parse the cookie attribute and update the corresponsing Cookie
properties. | boolean | pathMatch(String path, String topmostPath) Performs path-match as defined by the cookie specification.
Parameters: path - The target path. Parameters: topmostPath - The cookie path attribute. | void | setValidDateFormats(Collection datepatterns) Sets the
Collection of date patterns used for parsing. | void | validate(String host, int port, String path, boolean secure, Cookie cookie) Validate the cookie according to validation rules defined by the
cookie specification. |
PATH_DELIM | final static String PATH_DELIM(Code) | | Path delimiter
|
PATH_DELIM_CHAR | final static char PATH_DELIM_CHAR(Code) | | Path delimiting charachter
|
domainMatch | boolean domainMatch(String host, String domain)(Code) | | Performs domain-match as defined by the cookie specification.
Parameters: host - The target host. Parameters: domain - The cookie domain attribute. true if the specified host matches the given domain. since: 3.0 |
formatCookie | String formatCookie(Cookie cookie)(Code) | | Create a "Cookie" header value for an array of cookies.
Parameters: cookie - the cookie to be formatted as string a string suitable for sending in a "Cookie" header. |
match | boolean match(String host, int port, String path, boolean secure, Cookie cookie)(Code) | | Determines if a Cookie matches a location.
Parameters: host - the host to which the request is being submitted Parameters: port - the port to which the request is being submitted Parameters: path - the path to which the request is being submitted Parameters: secure - true if the request is using a secure connection Parameters: cookie - the Cookie to be matched true if the cookie should be submitted with a request with given attributes, false otherwise. |
match | Cookie[] match(String host, int port, String path, boolean secure, Cookie cookies)(Code) | | Determines which of an array of Cookies matches a location.
Parameters: host - the host to which the request is being submitted Parameters: port - the port to which the request is being submitted (currenlty ignored) Parameters: path - the path to which the request is being submitted Parameters: secure - true if the request is using a secure protocol Parameters: cookies - an array of Cookies to be matched true if the cookie should be submitted with a request with given attributes, false otherwise. |
pathMatch | boolean pathMatch(String path, String topmostPath)(Code) | | Performs path-match as defined by the cookie specification.
Parameters: path - The target path. Parameters: topmostPath - The cookie path attribute. true if the paths match since: 3.0 |
|
|