org.apache.commons.httpclient.cookie

Class IgnoreCookiesSpec

Implemented Interfaces:
CookieSpec

public class IgnoreCookiesSpec
extends Object
implements CookieSpec

A cookie spec that does nothing. Cookies are neither parsed, formatted nor matched.

Since:
3.0

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)
String
formatCookie(Cookie cookie)
Header
formatCookieHeader(Cookie cookie)
Header
formatCookieHeader(Cookie[] cookies)
String
formatCookies(Cookie[] cookies)
Collection
getValidDateFormats()
boolean
match(String host, int port, String path, boolean secure, Cookie cookie)
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, String header)
Returns an empty cookie array.
Cookie[]
parse(String host, int port, String path, boolean secure, Header header)
Returns an empty cookie array.
void
parseAttribute(NameValuePair attribute, Cookie cookie)
Does nothing.
boolean
pathMatch(String path, String topmostPath)
void
setValidDateFormats(Collection datepatterns)
Does nothing.
void
validate(String host, int port, String path, boolean secure, Cookie cookie)
Does nothing.

Constructor Details

IgnoreCookiesSpec

public IgnoreCookiesSpec()

Method Details

domainMatch

public boolean domainMatch(String host,
                           String domain)
Specified by:
domainMatch in interface CookieSpec

Returns:
false


formatCookie

public String formatCookie(Cookie cookie)
Specified by:
formatCookie in interface CookieSpec

Returns:
null


formatCookieHeader

public Header formatCookieHeader(Cookie cookie)
            throws IllegalArgumentException
Specified by:
formatCookieHeader in interface CookieSpec

Returns:
null


formatCookieHeader

public Header formatCookieHeader(Cookie[] cookies)
            throws IllegalArgumentException
Specified by:
formatCookieHeader in interface CookieSpec

Returns:
null


formatCookies

public String formatCookies(Cookie[] cookies)
            throws IllegalArgumentException
Specified by:
formatCookies in interface CookieSpec

Returns:
null


getValidDateFormats

public Collection getValidDateFormats()
Specified by:
getValidDateFormats in interface CookieSpec

Returns:
null


match

public boolean match(String host,
                     int port,
                     String path,
                     boolean secure,
                     Cookie cookie)
Specified by:
match in interface CookieSpec

Returns:
false


match

public Cookie[] match(String host,
                      int port,
                      String path,
                      boolean secure,
                      Cookie[] cookies)
Returns an empty cookie array. All parameters are ignored.


parse

public Cookie[] parse(String host,
                      int port,
                      String path,
                      boolean secure,
                      String header)
            throws MalformedCookieException
Returns an empty cookie array. All parameters are ignored.
Specified by:
parse in interface CookieSpec


parse

public Cookie[] parse(String host,
                      int port,
                      String path,
                      boolean secure,
                      Header header)
            throws MalformedCookieException,
                   IllegalArgumentException
Returns an empty cookie array. All parameters are ignored.
Specified by:
parse in interface CookieSpec


parseAttribute

public void parseAttribute(NameValuePair attribute,
                           Cookie cookie)
            throws MalformedCookieException,
                   IllegalArgumentException
Does nothing.
Specified by:
parseAttribute in interface CookieSpec


pathMatch

public boolean pathMatch(String path,
                         String topmostPath)
Specified by:
pathMatch in interface CookieSpec

Returns:
false


setValidDateFormats

public void setValidDateFormats(Collection datepatterns)
Does nothing.
Specified by:
setValidDateFormats in interface CookieSpec


validate

public void validate(String host,
                     int port,
                     String path,
                     boolean secure,
                     Cookie cookie)
            throws MalformedCookieException,
                   IllegalArgumentException
Does nothing.
Specified by:
validate in interface CookieSpec


Copyright (c) 1999-2005 - Apache Software Foundation