FileDocCategorySizeDatePackage
SetCookie.javaAPI DocAndroid 1.5 API3532Wed May 06 22:41:10 BST 2009org.apache.http.cookie

SetCookie

public interface SetCookie implements Cookie
This interface represents a SetCookie response header sent by the origin server to the HTTP agent in order to maintain a conversational state.
author
Oleg Kalnichevski
since
4.0

Fields Summary
Constructors Summary
Methods Summary
public voidsetComment(java.lang.String comment)
If a user agent (web browser) presents this cookie to a user, the cookie's purpose will be described using this comment.

param
comment
see
#getComment()

public voidsetDomain(java.lang.String domain)
Sets the domain attribute.

param
domain The value of the domain attribute
see
Cookie#getDomain

public voidsetExpiryDate(java.util.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.

param
expiryDate the {@link Date} after which this cookie is no longer valid.
see
Cookie#getExpiryDate

public voidsetPath(java.lang.String path)
Sets the path attribute.

param
path The value of the path attribute
see
Cookie#getPath

public voidsetSecure(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.

param
secure The value of the secure attribute
see
#isSecure()

public voidsetValue(java.lang.String value)

public voidsetVersion(int version)
Sets the version of the cookie specification to which this cookie conforms.

param
version the version of the cookie.
see
Cookie#getVersion