|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.sun.slamd.http.HTTPCookie
public class HTTPCookie
This class defines a cookie that may be used to help retain state information between requests.
| Field Summary | |
|---|---|
static java.text.SimpleDateFormat |
EXPIRATION_DATE_FORMAT
The date formatter that will be used to parse dates from cookies. |
| Constructor Summary | |
|---|---|
HTTPCookie(java.lang.String name,
java.lang.String value,
java.lang.String domain,
java.lang.String path,
long expirationDate,
boolean secure)
Creates a new cookie with the provided information. |
|
HTTPCookie(java.lang.String name,
java.lang.String value,
java.lang.String domain,
java.lang.String path,
long expirationDate,
boolean secure,
java.lang.String comment,
int version)
Creates a new cookie with the provided information. |
|
HTTPCookie(java.net.URL requestURL,
java.lang.String cookieString)
Creates a new cookie by parsing it from the provided string. |
|
| Method Summary | |
|---|---|
boolean |
appliesToRequest(java.net.URL requestURL,
long currentTime)
Indicates whether this cookie applies to the provided request. |
java.lang.String |
getComment()
Retrieves the comment for this cookie. |
java.lang.String |
getDomain()
Retrieves the domain associated with this cookie. |
long |
getExpirationDate()
Retrieves the expiration date for this cookie. |
java.lang.String |
getName()
Retrieves the name for this cookie. |
java.lang.String |
getPath()
Retrieves the path associated with this cookie. |
boolean |
getSecure()
Indicates whether this cookie should be only provided over secure connections. |
java.lang.String |
getValue()
Retrieves the value for this cookie. |
int |
getVersion()
Retrieves the version for this cookie. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.text.SimpleDateFormat EXPIRATION_DATE_FORMAT
| Constructor Detail |
|---|
public HTTPCookie(java.net.URL requestURL,
java.lang.String cookieString)
throws HTTPException
requestURL - The URL of the request with which the cookie is
associated.cookieString - The string to be parsed to create the cookie.
HTTPException - If a problem occurs while attempting to parse the
provided string as a cookie.
public HTTPCookie(java.lang.String name,
java.lang.String value,
java.lang.String domain,
java.lang.String path,
long expirationDate,
boolean secure)
name - The name of the data associated with this cookie.value - The value of the data associated with this cookie.domain - The domain with which this cookie should be used.path - The path for which this cookie should be used.expirationDate - The time that this cookie should expire, or -1 if
there should be no expiration date.secure - Indicates whether this cookie should only be
provided over a secure connection.
public HTTPCookie(java.lang.String name,
java.lang.String value,
java.lang.String domain,
java.lang.String path,
long expirationDate,
boolean secure,
java.lang.String comment,
int version)
name - The name of the data associated with this cookie.value - The value of the data associated with this cookie.domain - The domain with which this cookie should be used.path - The path for which this cookie should be used.expirationDate - The time that this cookie should expire, or -1 if
there should be no expiration date.secure - Indicates whether this cookie should only be
provided over a secure connection.comment - The comment for this cookie.version - The version for this cookie, or -1 if there is no
version.| Method Detail |
|---|
public java.lang.String getName()
public java.lang.String getValue()
public java.lang.String getDomain()
public java.lang.String getPath()
public long getExpirationDate()
public boolean getSecure()
true if this cookie should only be provided over
secure connections, or false if not.public java.lang.String getComment()
null if there is
none.public int getVersion()
public boolean appliesToRequest(java.net.URL requestURL,
long currentTime)
requestURL - The request for which to make the determination.currentTime - The time to use when determining whether the cookie
is expired.
true if this cookie should be included in the given
request, or false if not.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||