SetCookie.
| Modifier and Type | Field and Description |
|---|---|
| private Map | attribs
Cookie attributes as specified by the origin server |
| private String | cookieComment
Comment attribute. |
| private String | cookieDomain
Domain attribute. |
| private Date | cookieExpiryDate
Expiration |
| private String | cookiePath
Path attribute. |
| private int | cookieVersion
The version of the cookie specification I was created from. |
| private Date | |
| private boolean | isSecure
My secure flag. |
| private final String | name
Cookie name |
| private static final long | |
| private String | value
Cookie value |
| Access | Constructor and Description |
|---|---|
| public | BasicClientCookie(final String
The name. name, final String The value. value)Default Constructor taking a name and a value. |
| Modifier and Type | Method and Description |
|---|---|
| public Object | |
| public boolean | containsAttribute(final String name)
Implements org. |
| public String | |
| public String | Returns: commentImplements org. null if no such comment has been defined.
|
| public String | |
| public Date | |
| public String | Returns: the value of the domain attributeImplements org. |
| public Date | getExpiryDate()
Implements org. Date of the cookie, or null
if none exists.
|
| public String | Returns: String name The nameImplements org. |
| public String | Returns: The value of the path attribute.Implements org. |
| public int[] | |
| public String | Returns: String value The current value.Implements org. |
| public int | Returns: the version of the cookie.Implements org. |
| public boolean | Returns: true if the cookie has expired.Current time date)Implements org. |
| public boolean | Returns: false if the cookie should be discarded at the end
of the "session"; true otherwiseImplements org. false if the cookie should be discarded at the end
of the "session"; true otherwise.
|
| public boolean | Returns: true if this cookie should only be sent over secure connections.Implements org. |
| public boolean | |
| public void | |
| public void | setComment(final String comment)
Implements org. |
| public void | |
| public void | setDomain(final String
The value of the domain attribute domain)Implements org. |
| public void | setExpiryDate(final Date
the expiryDate)Date after which this cookie is no longer valid.Implements org. |
| public void | setPath(final String
The value of the path attribute path)Implements org. |
| public void | setSecure(final boolean
The value of the secure attribute secure)Implements org. |
| public void | |
| public void | setVersion(final int
the version of the cookie. version)Implements org. |
| public String |
| attribs | back to summary |
|---|---|
| private Map<String, String> attribs Cookie attributes as specified by the origin server | |
| cookieComment | back to summary |
|---|---|
| private String cookieComment Comment attribute. | |
| cookieDomain | back to summary |
|---|---|
| private String cookieDomain Domain attribute. | |
| cookieExpiryDate | back to summary |
|---|---|
| private Date cookieExpiryDate Expiration | |
| cookiePath | back to summary |
|---|---|
| private String cookiePath Path attribute. | |
| cookieVersion | back to summary |
|---|---|
| private int cookieVersion The version of the cookie specification I was created from. | |
| creationDate | back to summary |
|---|---|
| private Date creationDate | |
| isSecure | back to summary |
|---|---|
| private boolean isSecure My secure flag. | |
| name | back to summary |
|---|---|
| private final String name Cookie name | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| value | back to summary |
|---|---|
| private String value Cookie value | |
| BasicClientCookie | back to summary |
|---|---|
| public BasicClientCookie(final String name, final String value) Default Constructor taking a name and a value. The value may be null. | |
| clone | back to summary |
|---|---|
| public Object clone() throws CloneNotSupportedException Overrides java. Doc from java. Creates and returns a copy of this object. The precise meaning
of "copy" may depend on the class of the object. The general
intent is that, for any object will be true, and that the expression:x.clone() != x will bex.clone().getClass() == x.getClass() true, but these are not absolute requirements.
While it is typically the case that:
will bex.clone().equals(x) true, this is not an absolute requirement.
By convention, the returned object should be obtained by calling
By convention, the object returned by this method should be independent
of this object (which is being cloned). To achieve this independence,
it may be necessary to modify one or more fields of the object returned
by
| |
| containsAttribute | back to summary |
|---|---|
| public boolean containsAttribute(final String name) Implements org.
| |
| getAttribute | back to summary |
|---|---|
| public String getAttribute(final String name) Implements org.
| |
| getComment | back to summary |
|---|---|
| public String getComment() Implements org. Returns the comment describing the purpose of this cookie, or
| |
| getCommentURL | back to summary |
|---|---|
| public String getCommentURL() Implements org. Returns null. Cookies prior to RFC2965 do not set this attribute
| |
| getCreationDate | back to summary |
|---|---|
public Date getCreationDate()
| |
| getDomain | back to summary |
|---|---|
| public String getDomain() Implements org. Returns domain attribute of the cookie.
| |
| getExpiryDate | back to summary |
|---|---|
| public Date getExpiryDate() Implements org. Returns the expiration Note the object returned by this method is considered immutable. Changing it (e.g. using setTime()) could result in undefined behaviour. Do so at your peril.
| |
| getName | back to summary |
|---|---|
| public String getName() Implements org. Returns the name. | |
| getPath | back to summary |
|---|---|
| public String getPath() Implements org. Returns the path attribute of the cookie
| |
| getPorts | back to summary |
|---|---|
| public int[] getPorts() Implements org. Returns null. Cookies prior to RFC2965 do not set this attribute
| |
| getValue | back to summary |
|---|---|
| public String getValue() Implements org. Returns the value. | |
| getVersion | back to summary |
|---|---|
| public int getVersion() Implements org. Returns the version of the cookie specification to which this cookie conforms.
| |
| isExpired | back to summary |
|---|---|
| public boolean isExpired(final Date date) Implements org. Returns true if this cookie has expired. | |
| isPersistent | back to summary |
|---|---|
| public boolean isPersistent() Implements org. Returns
| |
| isSecure | back to summary |
|---|---|
| public boolean isSecure() Implements org. Doc from org. Indicates whether this cookie requires a secure connection.
| |
| removeAttribute | back to summary |
|---|---|
public boolean removeAttribute(final String name)
| |
| setAttribute | back to summary |
|---|---|
| public void setAttribute(final String name, final String value) | |
| setComment | back to summary |
|---|---|
| public void setComment(final String comment) Implements org. If a user agent (web browser) presents this cookie to a user, the cookie's purpose will be described using this comment.
| |
| setCreationDate | back to summary |
|---|---|
public void setCreationDate(final Date creationDate)
| |
| setDomain | back to summary |
|---|---|
| public void setDomain(final String domain) Implements org. Sets the domain attribute. | |
| setExpiryDate | back to summary |
|---|---|
| public void setExpiryDate(final Date expiryDate) Implements org. Sets expiration date. Note the object returned by this method is considered immutable. Changing it (e.g. using setTime()) could result in undefined behaviour. Do so at your peril.
| |
| setPath | back to summary |
|---|---|
| public void setPath(final String path) Implements org. Sets the path attribute. | |
| setSecure | back to summary |
|---|---|
| public void setSecure(final boolean secure) Implements org. Sets the secure attribute of the cookie.
When
| |
| setValue | back to summary |
|---|---|
| public void setValue(final String value) Implements org. Sets the value
| |
| setVersion | back to summary |
|---|---|
| public void setVersion(final int version) Implements org. Sets the version of the cookie specification to which this cookie conforms.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |