| java.lang.Object org.apache.cactus.Cookie
All known Subclasses: org.apache.cactus.HttpSessionCookie,
Cookie | public class Cookie implements Serializable(Code) | | Client cookie. Used for manipulating client cookies either in
beginXXX() (to send cookies) or in
endXXX() methods (to assert returned cookies).
version: $Id: Cookie.java 238991 2004-05-22 11:34:50Z vmassol $ |
Cookie | public Cookie(String theDomain, String theName, String theValue)(Code) | | Create a cookie.
Parameters: theDomain - the cookie domain Parameters: theName - the cookie name Parameters: theValue - the cookie value |
equals | public boolean equals(Object theObject)(Code) | | Two cookies match if the name, path and domain match.
Parameters: theObject - the cookie object to match true of the object passed as paramater is equal to this coookieinstance |
getComment | public String getComment()(Code) | | Returns the comment describing the purpose of this cookie, or
null if no such comment has been defined.
the cookie comment |
getDomain | public String getDomain()(Code) | | Returns the domain of this cookie.
the cookie domain |
getExpiryDate | public Date getExpiryDate()(Code) | | Return the expiry date.
the expiry date of this cookie, or null if none set. |
getPath | public String getPath()(Code) | | Return the path this cookie is associated with.
the cookie path |
hashCode | public int hashCode()(Code) | | Hash up name, value and domain into new hash.
the hashcode of this class |
isExpired | public boolean isExpired()(Code) | | true if this cookie has expired |
isSecure | public boolean isSecure()(Code) | | true if the cookie should only be sent over secure connections. |
isToBeDiscarded | public boolean isToBeDiscarded()(Code) | | true if the cookie should be discarded at the end of thesession; false otherwise |
setComment | public void setComment(String theComment)(Code) | | If a user agent (web browser) presents this cookie to a user, the
cookie's purpose will be described using this comment.
Parameters: theComment - the cookie's text comment |
setDomain | public void setDomain(String theDomain)(Code) | | Sets the cookie domain. This cookie should be presented only to hosts
satisfying this domain name pattern. Read RFC 2109 for specific
details of the syntax.
Briefly, a domain name name begins with a dot (".foo.com") and means
that hosts in that DNS zone ("www.foo.com", but not "a.b.foo.com")
should see the cookie. By default, cookies are only returned to
the host which saved them.
Parameters: theDomain - the cookie domain |
setExpiryDate | public void setExpiryDate(Date theExpiryDate)(Code) | | Set the cookie expires date.
Netscape's original proposal defined an Expires header that took
a date value in a fixed-length variant format in place of Max-Age:
Wdy, DD-Mon-YY HH:MM:SS GMT
Note that the Expires date format contains embedded spaces, and that
"old" cookies did not have quotes around values. Clients that
implement to this specification should be aware of "old" cookies and
Expires.
Parameters: theExpiryDate - the expires date. |
setName | public void setName(String theName)(Code) | | Sets the cookie name
Parameters: theName - the cookie name |
setPath | public void setPath(String thePath)(Code) | | Sets the cookie path. This cookie should be presented only with
requests beginning with this URL. Read RFC 2109 for a specification
of the default behaviour. Basically, URLs in the same "directory" as
the one which set the cookie, and in subdirectories, can all see the
cookie unless a different path is set.
Parameters: thePath - the cookie path |
setSecure | public void setSecure(boolean isSecure)(Code) | | Indicates to the user agent that the cookie should only be sent
using a secure protocol (https). This should only be set when
the cookie's originating server used a secure protocol to set the
cookie's value.
Parameters: isSecure - true if the cookie should be sent over secureconnections only |
setValue | public void setValue(String theValue)(Code) | | Sets the cookie value
Parameters: theValue - the cookie value |
toString | public String toString()(Code) | | a string representation of the cookie |
|
|