|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.commons.httpclient.cookie.CookieSpecBase | +--org.apache.commons.httpclient.cookie.RFC2109Spec
RFC 2109 specific cookie management functions
Field Summary |
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 | |
RFC2109Spec()
Default constructor |
Method Summary | |
java.lang.String |
formatCookie(Cookie cookie)
Return a string suitable for sending in a "Cookie" header as defined in RFC 2109 |
Header |
formatCookieHeader(Cookie cookie)
Create a RFC 2109 compliant "Cookie" Header containing the Cookie . |
java.lang.String |
formatCookies(Cookie[] cookies)
Create a RFC 2109 compliant "Cookie" header value containing all Cookie s in cookies suitable for sending in a "Cookie" header |
void |
parseAttribute(NameValuePair attribute,
Cookie cookie)
Parse RFC 2109 specific cookie attribute and update the corresponsing Cookie
properties. |
void |
validate(java.lang.String host,
int port,
java.lang.String path,
boolean secure,
Cookie cookie)
Performs RFC 2109 compliant Cookie validation |
Methods inherited from class org.apache.commons.httpclient.cookie.CookieSpecBase |
formatCookieHeader, match, match, parse, parse |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public RFC2109Spec()
Method Detail |
public void parseAttribute(NameValuePair attribute, Cookie cookie) throws MalformedCookieException
Cookie
properties.
parseAttribute
in interface CookieSpec
parseAttribute
in class CookieSpecBase
attribute
- NameValuePair
cookie attribute from the Set-Cookiecookie
- Cookie
to be updated
MalformedCookieException
- if an exception occurs during parsing
java.lang.IllegalArgumentException
- if an input parameter is illegalpublic void validate(java.lang.String host, int port, java.lang.String path, boolean secure, Cookie cookie) throws MalformedCookieException
Cookie
validation
validate
in interface CookieSpec
validate
in class CookieSpecBase
host
- 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 connection
MalformedCookieException
- if an exception occurs during validation
java.lang.IllegalArgumentException
- if an input parameter is illegalpublic java.lang.String formatCookie(Cookie cookie)
formatCookie
in interface CookieSpec
formatCookie
in class CookieSpecBase
public java.lang.String formatCookies(Cookie[] cookies)
Cookie
s in cookies suitable for sending in a "Cookie" header
formatCookies
in interface CookieSpec
formatCookies
in class CookieSpecBase
java.lang.IllegalArgumentException
- if an input parameter is illegalpublic Header formatCookieHeader(Cookie cookie)
Header
containing the Cookie
.
formatCookieHeader
in interface CookieSpec
formatCookieHeader
in class CookieSpecBase
java.lang.IllegalArgumentException
- if an input parameter is illegal
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |