|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.httpclient.cookie.IgnoreCookiesSpec
public class IgnoreCookiesSpec
A cookie spec that does nothing. Cookies are neither parsed, formatted nor matched. It can be used to effectively disable cookies altogether.
Field Summary |
---|
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(List<Cookie> cookies)
Create a "Cookie" Header for an array of Cookies. |
String |
formatCookies(List<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. |
List<Cookie> |
match(String host,
int port,
String path,
boolean secure,
List<Cookie> cookies)
Returns an empty cookie array. |
List<Cookie> |
parse(String host,
int port,
String path,
boolean secure,
Header header)
Returns an empty cookie array. |
List<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 List<Cookie> parse(String host, int port, String path, boolean secure, String header)
cookie
array. All parameters are ignored.
parse
in interface CookieSpec
host
- port
- path
- secure
- header
-
cookie
arrayCookieSpec.validate(String, int, String, boolean, Cookie)
public Collection getValidDateFormats()
CookieSpec
Collection
of date patterns used for parsing. The String patterns are compatible
with the SimpleDateFormat
.
getValidDateFormats
in interface CookieSpec
null
public void setValidDateFormats(Collection datepatterns)
setValidDateFormats
in interface CookieSpec
datepatterns
- ignoredpublic String formatCookie(Cookie cookie)
CookieSpec
formatCookie
in interface CookieSpec
cookie
- ignored
null
public Header formatCookieHeader(Cookie cookie) throws IllegalArgumentException
CookieSpec
formatCookieHeader
in interface CookieSpec
cookie
- ignored
null
IllegalArgumentException
public Header formatCookieHeader(List<Cookie> cookies) throws IllegalArgumentException
CookieSpec
formatCookieHeader
in interface CookieSpec
cookies
- ignored
null
IllegalArgumentException
public String formatCookies(List<Cookie> cookies) throws IllegalArgumentException
CookieSpec
formatCookies
in interface CookieSpec
cookies
- ignored
null
IllegalArgumentException
public boolean match(String host, int port, String path, boolean secure, Cookie cookie)
CookieSpec
match
in interface CookieSpec
host
- ignoredport
- ignoredpath
- ignoredsecure
- ignoredcookie
- ignored
false
public List<Cookie> match(String host, int port, String path, boolean secure, List<Cookie> cookies)
cookie
array. All parameters are ignored.
match
in interface CookieSpec
host
- ignoredport
- ignoredpath
- ignoredsecure
- ignoredcookies
- ignored
public List<Cookie> parse(String host, int port, String path, boolean secure, Header header) throws IllegalArgumentException
cookie
array. All parameters are ignored.
parse
in interface CookieSpec
host
- ignoredport
- ignoredpath
- ignoredsecure
- ignoredheader
- ignored
IllegalArgumentException
CookieSpec.validate(String, int, String, boolean, Cookie)
public void parseAttribute(NameValuePair attribute, Cookie cookie) throws IllegalArgumentException
parseAttribute
in interface CookieSpec
attribute
- ignoredcookie
- ignored
IllegalArgumentException
public void validate(String host, int port, String path, boolean secure, Cookie cookie) throws IllegalArgumentException
validate
in interface CookieSpec
host
- ignoredport
- ignoredpath
- ignoredsecure
- ignoredcookie
- ignored
IllegalArgumentException
public boolean domainMatch(String host, String domain)
CookieSpec
domainMatch
in interface CookieSpec
host
- ignoreddomain
- ignored
false
public boolean pathMatch(String path, String topmostPath)
CookieSpec
pathMatch
in interface CookieSpec
path
- ignoredtopmostPath
- ignored
false
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |