public final class CookieSetting extends Cookie
Response.getCookieSettings()
Constructor and Description |
---|
CookieSetting()
Default constructor.
|
CookieSetting(int version,
String name,
String value)
Constructor.
|
CookieSetting(int version,
String name,
String value,
String path,
String domain)
Constructor.
|
CookieSetting(int version,
String name,
String value,
String path,
String domain,
String comment,
int maxAge,
boolean secure)
Constructor.
|
CookieSetting(int version,
String name,
String value,
String path,
String domain,
String comment,
int maxAge,
boolean secure,
boolean accessRestricted)
Constructor.
|
CookieSetting(String name,
String value)
Preferred constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
String |
getComment()
Returns the comment for the user.
|
String |
getDescription()
Returns the description of this REST element.
|
int |
getMaxAge()
Returns the maximum age in seconds.
|
int |
hashCode() |
boolean |
isAccessRestricted()
Indicates if cookie access is restricted for untrusted parties.
|
boolean |
isSecure()
Indicates if cookie should only be transmitted by secure means.
|
void |
setAccessRestricted(boolean accessRestricted)
Indicates whether to restrict cookie access to untrusted parties.
|
void |
setComment(String comment)
Sets the comment for the user.
|
void |
setMaxAge(int maxAge)
Sets the maximum age in seconds.
|
void |
setSecure(boolean secure)
Indicates if cookie should only be transmitted by secure means.
|
String |
toString() |
public CookieSetting()
public CookieSetting(int version, String name, String value)
version
- The cookie's version.name
- The cookie's name.value
- The cookie's value.public CookieSetting(int version, String name, String value, String path, String domain)
version
- The cookie's version.name
- The cookie's name.value
- The cookie's value.path
- The cookie's path.domain
- The cookie's domain name.public CookieSetting(int version, String name, String value, String path, String domain, String comment, int maxAge, boolean secure)
version
- The cookie's version.name
- The cookie's name.value
- The cookie's value.path
- The cookie's path.domain
- The cookie's domain name.comment
- The cookie's comment.maxAge
- Sets the maximum age in seconds.secure
- Indicates if cookie should only be transmitted by secure
means.public CookieSetting(int version, String name, String value, String path, String domain, String comment, int maxAge, boolean secure, boolean accessRestricted)
version
- The cookie's version.name
- The cookie's name.value
- The cookie's value.path
- The cookie's path.domain
- The cookie's domain name.comment
- The cookie's comment.maxAge
- Sets the maximum age in seconds.secure
- Indicates if cookie should only be transmitted by secure
means.accessRestricted
- Indicates whether to restrict cookie access to untrusted
parties. Currently this toggles the non-standard but widely
supported HttpOnly cookie parameter.public String getComment()
public String getDescription()
public int getMaxAge()
public boolean isAccessRestricted()
public boolean isSecure()
public void setAccessRestricted(boolean accessRestricted)
accessRestricted
- True if cookie access should be restrictedpublic void setComment(String comment)
comment
- The comment for the user.public void setMaxAge(int maxAge)
maxAge
- The maximum age in seconds.public void setSecure(boolean secure)
secure
- True if cookie should only be transmitted by secure means.Copyright © 2005–2014. All rights reserved.