java.lang.Object | |
↳ | org.apache.http.impl.cookie.BasicClientCookie |
Known Direct Subclasses |
HTTP "magic-cookie" represents a piece of state information that the HTTP agent and the target server can exchange to maintain a session.
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From interface org.apache.http.cookie.ClientCookie |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Default Constructor taking a name and a value.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates and returns a copy of this
Object . | |||||||||||
Returns the comment describing the purpose of this cookie, or
null if no such comment has been defined.
| |||||||||||
Returns null.
| |||||||||||
Returns domain attribute of the cookie.
| |||||||||||
Returns the expiration
Date of the cookie, or null
if none exists. | |||||||||||
Returns the name.
| |||||||||||
Returns the path attribute of the cookie
| |||||||||||
Returns null.
| |||||||||||
Returns the value.
| |||||||||||
Returns the version of the cookie specification to which this
cookie conforms.
| |||||||||||
Returns true if this cookie has expired.
| |||||||||||
Returns false if the cookie should be discarded at the end
of the "session"; true otherwise.
| |||||||||||
Indicates whether this cookie requires a secure connection.
| |||||||||||
If a user agent (web browser) presents this cookie to a user, the
cookie's purpose will be described using this comment.
| |||||||||||
Sets the domain attribute.
| |||||||||||
Sets expiration date.
| |||||||||||
Sets the path attribute.
| |||||||||||
Sets the secure attribute of the cookie.
| |||||||||||
Sets the value
| |||||||||||
Sets the version of the cookie specification to which this
cookie conforms.
| |||||||||||
Returns a string containing a concise, human-readable description of this
object.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface org.apache.http.cookie.ClientCookie | |||||||||||
From interface org.apache.http.cookie.Cookie | |||||||||||
From interface org.apache.http.cookie.SetCookie |
Default Constructor taking a name and a value. The value may be null.
name | The name. |
---|---|
value | The value. |
Creates and returns a copy of this Object
. The default
implementation returns a so-called "shallow" copy: It creates a new
instance of the same class and then copies the field values (including
object references) from this instance to the new instance. A "deep" copy,
in contrast, would also recursively clone nested objects. A subclass that
needs to implement this kind of cloning should call super.clone()
to create the new instance and then create deep copies of the nested,
mutable objects.
CloneNotSupportedException |
---|
Returns the comment describing the purpose of this cookie, or null if no such comment has been defined.
Returns null. Cookies prior to RFC2965 do not set this attribute
Returns domain attribute of the cookie.
Returns the path attribute of the cookie
Returns null. Cookies prior to RFC2965 do not set this attribute
Returns the value.
Returns the version of the cookie specification to which this cookie conforms.
Returns true if this cookie has expired.
date | Current time |
---|
Returns false if the cookie should be discarded at the end of the "session"; true otherwise.
Indicates whether this cookie requires a secure connection.
true
if this cookie should only be sent over secure connections.If a user agent (web browser) presents this cookie to a user, the cookie's purpose will be described using this comment.
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.
expiryDate | the Date after which this cookie is no longer valid. |
---|
Sets the secure attribute of the cookie.
When true 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.
secure | The value of the secure attribute |
---|
Sets the version of the cookie specification to which this cookie conforms.
version | the version of the cookie. |
---|
Returns a string containing a concise, human-readable description of this object. Subclasses are encouraged to override this method and provide an implementation that takes into account the object's type and data. The default implementation is equivalent to the following expression:
getClass().getName() + '@' + Integer.toHexString(hashCode())
See Writing a useful
toString
method
if you intend implementing your own toString
method.