org.apache.http.cookie.SetCookie |
Known Indirect Subclasses
BasicClientCookie |
HTTP "magic-cookie" represents a piece of state information
that the HTTP agent and the target server can exchange to maintain
a session. |
BasicClientCookie2 |
HTTP "magic-cookie" represents a piece of state information
that the HTTP agent and the target server can exchange to maintain
a session as specified by RFC2965. |
SetCookie2 |
This interface represents a SetCookie2 response header sent by the
origin server to the HTTP agent in order to maintain a conversational state. |
|
Class Overview
This interface represents a SetCookie
response header sent by the
origin server to the HTTP agent in order to maintain a conversational state.
Summary
Public Methods |
abstract
void
|
setComment(String comment)
If a user agent (web browser) presents this cookie to a user, the
cookie's purpose will be described using this comment.
|
abstract
void
|
setDomain(String domain)
Sets the domain attribute.
|
abstract
void
|
setExpiryDate(Date expiryDate)
Sets expiration date.
|
abstract
void
|
setPath(String path)
Sets the path attribute.
|
abstract
void
|
setSecure(boolean secure)
Sets the secure attribute of the cookie.
|
abstract
void
|
setValue(String value)
|
abstract
void
|
setVersion(int version)
Sets the version of the cookie specification to which this
cookie conforms.
|
[Expand]
Inherited Methods |
From interface org.apache.http.cookie.Cookie
abstract
String
|
getComment()
Returns the comment describing the purpose of this cookie, or
null if no such comment has been defined.
|
abstract
String
|
getCommentURL()
If a user agent (web browser) presents this cookie to a user, the
cookie's purpose will be described by the information at this URL.
|
abstract
String
|
getDomain()
Returns domain attribute of the cookie.
|
abstract
Date
|
getExpiryDate()
Returns the expiration Date of the cookie, or null
if none exists.
|
abstract
String
|
getName()
Returns the name.
|
abstract
String
|
getPath()
Returns the path attribute of the cookie
|
abstract
int[]
|
getPorts()
Get the Port attribute.
|
abstract
String
|
getValue()
Returns the value.
|
abstract
int
|
getVersion()
Returns the version of the cookie specification to which this
cookie conforms.
|
abstract
boolean
|
isExpired(Date date)
Returns true if this cookie has expired.
|
abstract
boolean
|
isPersistent()
Returns false if the cookie should be discarded at the end
of the "session"; true otherwise.
|
abstract
boolean
|
isSecure()
Indicates whether this cookie requires a secure connection.
|
|
Public Methods
public
abstract
void
setComment
(String comment)
If a user agent (web browser) presents this cookie to a user, the
cookie's purpose will be described using this comment.
public
abstract
void
setDomain
(String domain)
Sets the domain attribute.
Parameters
domain
| The value of the domain attribute |
public
abstract
void
setExpiryDate
(Date expiryDate)
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.
Parameters
expiryDate
| the Date after which this cookie is no longer valid. |
public
abstract
void
setPath
(String path)
Parameters
path
| The value of the path attribute |
public
abstract
void
setSecure
(boolean secure)
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.
Parameters
secure
| The value of the secure attribute |
public
abstract
void
setValue
(String value)
public
abstract
void
setVersion
(int version)
Sets the version of the cookie specification to which this
cookie conforms.
Parameters
version
| the version of the cookie. |