org.apache.commons.httpclient.cookie
Class NetscapeDraftSpec

java.lang.Object
  |
  +--org.apache.commons.httpclient.cookie.CookieSpecBase
        |
        +--org.apache.commons.httpclient.cookie.NetscapeDraftSpec
All Implemented Interfaces:
CookieSpec

public class NetscapeDraftSpec
extends CookieSpecBase

Netscape cookie draft specific cookie management functions

Since:
2.0
Author:
B.C. Holmes, Park, Sung-Gu, Doug Sale, Rod Waldhoff, dIon Gillard, Sean C. Sullivan, John Evans, Marc A. Saegesser, Oleg Kalnichevski, Mike Bowler

Fields inherited from class org.apache.commons.httpclient.cookie.CookieSpecBase
LOG
 
Fields inherited from interface org.apache.commons.httpclient.cookie.CookieSpec
PATH_DELIM, PATH_DELIM_CHAR
 
Constructor Summary
NetscapeDraftSpec()
          Default constructor
 
Method Summary
 void parseAttribute(NameValuePair attribute, Cookie cookie)
          Parse the cookie attribute and update the corresponsing Cookie properties as defined by the Netscape draft specification
 void validate(String host, int port, String path, boolean secure, Cookie cookie)
          Performs Netscape draft compliant Cookie validation
 
Methods inherited from class org.apache.commons.httpclient.cookie.CookieSpecBase
formatCookie, formatCookieHeader, formatCookieHeader, formatCookies, match, match, parse, parse
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NetscapeDraftSpec

public NetscapeDraftSpec()
Default constructor
Method Detail

parseAttribute

public void parseAttribute(NameValuePair attribute,
                           Cookie cookie)
                    throws MalformedCookieException
Parse the cookie attribute and update the corresponsing Cookie properties as defined by the Netscape draft specification
Overrides:
parseAttribute in class CookieSpecBase
Parameters:
attribute - NameValuePair cookie attribute from the Set- Cookie
cookie - Cookie to be updated
Throws:
MalformedCookieException - if an exception occurs during parsing

validate

public void validate(String host,
                     int port,
                     String path,
                     boolean secure,
                     Cookie cookie)
              throws MalformedCookieException
Performs Netscape draft compliant Cookie validation
Overrides:
validate in class CookieSpecBase
Parameters:
host - the host from which the Cookie was received
port - the port from which the Cookie was received
path - the path from which the Cookie was received
secure - true when the Cookie was received using a secure connection
cookie - The cookie to validate.
Throws:
MalformedCookieException - if an exception occurs during validation


Copyright © 2001-2004 Apache Software Foundation. All Rights Reserved.