|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--org.apache.commons.httpclient.cookie.IgnoreCookiesSpec
A cookie spec that does nothing. Cookies are neither parsed, formatted nor matched. It can be used to effectively disable cookies altogether.
| Fields inherited from interface org.apache.commons.httpclient.cookie.CookieSpec |
PATH_DELIM, PATH_DELIM_CHAR |
| Constructor Summary | |
IgnoreCookiesSpec()
|
|
| Method Summary | |
boolean |
domainMatch(String host,
String domain)
Performs domain-match as defined by the cookie specification. |
String |
formatCookie(Cookie cookie)
Create a "Cookie" header value for an array of cookies. |
Header |
formatCookieHeader(Cookie cookie)
Create a "Cookie" Header for single Cookie. |
Header |
formatCookieHeader(Cookie[] cookies)
Create a "Cookie" Header for an array of Cookies. |
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)
Returns an empty cookie array. |
Cookie[] |
parse(String host,
int port,
String path,
boolean secure,
Header header)
Returns an empty cookie array. |
Cookie[] |
parse(String host,
int port,
String path,
boolean secure,
String header)
Returns an empty cookie array. |
void |
parseAttribute(NameValuePair attribute,
Cookie cookie)
Does nothing. |
boolean |
pathMatch(String path,
String topmostPath)
Performs path-match as defined by the cookie specification. |
void |
setValidDateFormats(Collection datepatterns)
Does nothing. |
void |
validate(String host,
int port,
String path,
boolean secure,
Cookie cookie)
Does nothing. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public IgnoreCookiesSpec()
| Method Detail |
public Cookie[] parse(String host,
int port,
String path,
boolean secure,
String header)
throws MalformedCookieException
cookie array. All parameters are ignored.parse in interface CookieSpecorg.apache.commons.httpclient.cookie.CookieSpechost - the host which sent the Set-Cookie headerport - the port which sent the Set-Cookie headerpath - the path which sent the Set-Cookie headersecure - true when the Set-Cookie header
was received over secure conectionheader - the Set-Cookie received from the serverMalformedCookieException - if an exception occurs during parsingIllegalArgumentException - if an input parameter is illegalCookieSpec.validate(String, int, String, boolean, Cookie)public Collection getValidDateFormats()
CookieSpecCollection of date patterns used for parsing. The String patterns are compatible
with the SimpleDateFormat.getValidDateFormats in interface CookieSpecnullpublic void setValidDateFormats(Collection datepatterns)
setValidDateFormats in interface CookieSpecorg.apache.commons.httpclient.cookie.CookieSpecdatepatterns - collection of date patternspublic String formatCookie(Cookie cookie)
CookieSpecformatCookie in interface CookieSpecnull
public Header formatCookieHeader(Cookie cookie)
throws IllegalArgumentException
CookieSpecformatCookieHeader in interface CookieSpecnull
public Header formatCookieHeader(Cookie[] cookies)
throws IllegalArgumentException
CookieSpecformatCookieHeader in interface CookieSpecnull
public String formatCookies(Cookie[] cookies)
throws IllegalArgumentException
CookieSpecformatCookies in interface CookieSpecnull
public boolean match(String host,
int port,
String path,
boolean secure,
Cookie cookie)
CookieSpecmatch in interface CookieSpecfalse
public Cookie[] match(String host,
int port,
String path,
boolean secure,
Cookie[] cookies)
cookie array. All parameters are ignored.match in interface CookieSpecorg.apache.commons.httpclient.cookie.CookieSpechost - the host to which the request is being submittedport - the port to which the request is being submitted
(currenlty ignored)path - the path to which the request is being submittedsecure - true if the request is using a secure protocolcookies - an array of Cookies to be matched
public Cookie[] parse(String host,
int port,
String path,
boolean secure,
Header header)
throws MalformedCookieException,
IllegalArgumentException
cookie array. All parameters are ignored.parse in interface CookieSpecorg.apache.commons.httpclient.cookie.CookieSpechost - the host which sent the Set-Cookie headerport - the port which sent the Set-Cookie headerpath - the path which sent the Set-Cookie headersecure - true when the Set-Cookie header
was received over secure conectionheader - the Set-Cookie received from the serverMalformedCookieException - if an exception occurs during parsingIllegalArgumentException - if an input parameter is illegalCookieSpec.validate(String, int, String, boolean, Cookie)
public void parseAttribute(NameValuePair attribute,
Cookie cookie)
throws MalformedCookieException,
IllegalArgumentException
parseAttribute in interface CookieSpecorg.apache.commons.httpclient.cookie.CookieSpecattribute - cookie attribute from the Set-Cookiecookie - the to be updatedMalformedCookieException - if an exception occurs during parsingIllegalArgumentException - if an input parameter is illegal
public void validate(String host,
int port,
String path,
boolean secure,
Cookie cookie)
throws MalformedCookieException,
IllegalArgumentException
validate in interface CookieSpecorg.apache.commons.httpclient.cookie.CookieSpechost - the host from which the Cookie was receivedport - the port from which the Cookie was receivedpath - the path from which the Cookie was receivedsecure - true when the Cookie was received
using a secure connectioncookie - the Cookie to validateMalformedCookieException - if the cookie is invalidIllegalArgumentException - if an input parameter is illegal
public boolean domainMatch(String host,
String domain)
CookieSpecdomainMatch in interface CookieSpecfalse
public boolean pathMatch(String path,
String topmostPath)
CookieSpecpathMatch in interface CookieSpecfalse
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||