|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Cookie management specification must define
Field Summary | |
static java.lang.String |
PATH_DELIM
Path delimiter |
static char |
PATH_DELIM_CHAR
Path delimiting charachter |
Method Summary | |
java.lang.String |
formatCookie(Cookie cookie)
Return a string suitable for sending in a "Cookie" header |
Header |
formatCookieHeader(Cookie cookie)
Create a "Cookie" Header containing the Cookie . |
Header |
formatCookieHeader(Cookie[] cookies)
Create a "Cookie" Header containing all Cookie s in cookies. |
java.lang.String |
formatCookies(Cookie[] cookies)
Create a "Cookie" header value containing all Cookie s in cookies
suitable for sending in a "Cookie" header |
boolean |
match(java.lang.String host,
int port,
java.lang.String path,
boolean secure,
Cookie cookie)
Return true if the cookie should be submitted with a request with given attributes, false otherwise. |
Cookie[] |
match(java.lang.String host,
int port,
java.lang.String path,
boolean secure,
Cookie[] cookies)
Return an array of Cookie s that should be submitted with a request with
given attributes, false otherwise. |
Cookie[] |
parse(java.lang.String host,
int port,
java.lang.String path,
boolean secure,
Header header)
Parse the "Set-Cookie" Header into an array of Cookie s. |
Cookie[] |
parse(java.lang.String host,
int port,
java.lang.String path,
boolean secure,
java.lang.String header)
Parse the "Set-Cookie" header value into an array of Cookie s. |
void |
parseAttribute(NameValuePair attribute,
Cookie cookie)
Parse the cookie attribute and update the corresponsing Cookie properties. |
void |
validate(java.lang.String host,
int port,
java.lang.String path,
boolean secure,
Cookie cookie)
Perform Cookie validation accoding to validation rules defined by the cookie specification |
Field Detail |
public static final java.lang.String PATH_DELIM
public static final char PATH_DELIM_CHAR
Method Detail |
public Cookie[] parse(java.lang.String host, int port, java.lang.String path, boolean secure, java.lang.String header) throws MalformedCookieException
Cookie
s.
host
- the host from which the Set-Cookie value was receivedport
- the port from which the Set-Cookie value was receivedpath
- the path from which the Set-Cookie value was receivedsecure
- true when the Set-Cookie value was received over secure conectionheader
- the Set-Cookie received from the server
MalformedCookieException
- if an exception occurs during parsing
java.lang.IllegalArgumentException
- if an input parameter is illegalpublic Cookie[] parse(java.lang.String host, int port, java.lang.String path, boolean secure, Header header) throws MalformedCookieException
Header
into an array of Cookie
s.
host
- the host from which the Set-Cookie header was receivedport
- the port from which the Set-Cookie header was receivedpath
- the path from which the Set-Cookie header was receivedsecure
- true when the Set-Cookie header was received over secure conectionheader
- the Set-Cookie received from the server
MalformedCookieException
- if an exception occurs during parsing
java.lang.IllegalArgumentException
- if an input parameter is illegalpublic void parseAttribute(NameValuePair attribute, Cookie cookie) throws MalformedCookieException
Cookie
properties.
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 accoding to validation rules defined by the cookie specification
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 boolean match(java.lang.String host, int port, java.lang.String path, boolean secure, Cookie cookie)
host
- the host to which the request is being submittedport
- the port to which the request is being submittedpath
- the path to which the request is being submittedsecure
- true if the request is using a secure connection
public Cookie[] match(java.lang.String host, int port, java.lang.String path, boolean secure, Cookie[] cookies)
Cookie
s that should be submitted with a request with
given attributes, false otherwise.
host
- 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 protocol
public java.lang.String formatCookie(Cookie cookie)
public java.lang.String formatCookies(Cookie[] cookies)
Cookie
s in cookies
suitable for sending in a "Cookie" header
java.lang.IllegalArgumentException
- if an input parameter is illegalpublic Header formatCookieHeader(Cookie[] cookies)
Header
containing all Cookie
s in cookies.
Header
.
java.lang.IllegalArgumentException
- if an input parameter is illegalpublic Header formatCookieHeader(Cookie cookie)
Header
containing the Cookie
.
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 |