SetCookie.
| Modifier and Type | Field and Description |
|---|---|
| private Map | attribs
Cookie attributes as specified by the origin server |
| private String | cookieDomain
Domain attribute. |
| private Instant | cookieExpiryDate
Expiration |
| private String | cookiePath
Path attribute. |
| private Instant | |
| private boolean | httpOnly
The |
| 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 Date | getCreationDate()
Implements org.
Deprecated
Use
Returns creation time of the cookie.
getCreationInstant().
|
| public Instant | getCreationInstant()
Overrides default org. |
| public String | Returns: the value of the domain attributeImplements org. |
| public Date | getExpiryDate()
Implements org.
Deprecated
Use
Returns the expiration getExpiryInstant()
Date of the cookie, or null
if none exists.
|
| public Instant | getExpiryInstant()
Overrides default org. Instant 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 String | Returns: String value The current value.Implements org. |
| public boolean | Returns: true if the cookie has expired.Current time date)Implements org.
Deprecated
Use
Returns true if this cookie has expired.
isExpired(Instant)
|
| public boolean | Returns: true if the cookie has expired.Current time instant)Overrides default org. |
| public boolean | Returns: true if this Cookie has been marked ashttpOnly, false otherwiseOverrides default org. httpOnly.
|
| 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 | |
| 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.
Deprecated
Use {
Sets expiration date.
setExpiryDate(Instant)}
|
| public void | setExpiryDate(final Instant
the expiryInstant)Instant after which this cookie is no longer valid.Overrides default org. |
| public void | setHttpOnly(final boolean
true if this cookie is to be marked as
httpOnly)httpOnly, false otherwiseOverrides default 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 | setValue(final String value)
Implements org. |
| public String |
| attribs | back to summary |
|---|---|
| private Map<String, String> attribs Cookie attributes as specified by the origin server | |
| cookieDomain | back to summary |
|---|---|
| private String cookieDomain Domain attribute. | |
| cookieExpiryDate | back to summary |
|---|---|
| private Instant cookieExpiryDate Expiration | |
| cookiePath | back to summary |
|---|---|
| private String cookiePath Path attribute. | |
| creationDate | back to summary |
|---|---|
| private Instant creationDate | |
| httpOnly | back to summary |
|---|---|
| private boolean httpOnly The | |
| 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.
| |
| getCreationDate | back to summary |
|---|---|
| public Date getCreationDate() Implements org. Doc from org. Deprecated Use Returns creation time of the cookie.
| |
| getCreationInstant | back to summary |
|---|---|
| public Instant getCreationInstant() Overrides default org. Doc from org. Returns creation time of the cookie.
| |
| getDomain | back to summary |
|---|---|
| public String getDomain() Implements org. Returns domain attribute of the cookie.
| |
| getExpiryDate | back to summary |
|---|---|
| public Date getExpiryDate() Implements org. Deprecated 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.
| |
| getExpiryInstant | back to summary |
|---|---|
| public Instant getExpiryInstant() Overrides default org. Doc from 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
| |
| getValue | back to summary |
|---|---|
| public String getValue() Implements org. Returns the value. | |
| isExpired | back to summary |
|---|---|
| public boolean isExpired(final Date date) Implements org. Deprecated Returns true if this cookie has expired.
| |
| isExpired | back to summary |
|---|---|
| public boolean isExpired(final Instant instant) Overrides default org. Returns true if this cookie has expired. | |
| isHttpOnly | back to summary |
|---|---|
| public boolean isHttpOnly() Overrides default org. Doc from org. Checks whether this Cookie has been marked as The default implementation returns
| |
| 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) | |
| setCreationDate | back to summary |
|---|---|
| public void setCreationDate(final Date creationDate)
Deprecated
| |
| setCreationDate | back to summary |
|---|---|
public void setCreationDate(final Instant 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. Deprecated Use { 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.
| |
| setExpiryDate | back to summary |
|---|---|
| public void setExpiryDate(final Instant expiryInstant) Overrides default 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.
| |
| setHttpOnly | back to summary |
|---|---|
| public void setHttpOnly(final boolean httpOnly) Overrides default org. Sets the http-only attribute of the cookie.
| |
| 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
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |