|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.restlet.data.Parameter
org.restlet.data.Cookie
org.restlet.data.CookieSetting
public final class CookieSetting
Cookie setting provided by a server. This allows a server side application to add, modify or remove a cookie on the client. *
Response.getCookieSettings()
Constructor Summary | |
---|---|
CookieSetting()
Default constructor. |
|
CookieSetting(int version,
java.lang.String name,
java.lang.String value)
Constructor. |
|
CookieSetting(int version,
java.lang.String name,
java.lang.String value,
java.lang.String path,
java.lang.String domain)
Constructor. |
|
CookieSetting(int version,
java.lang.String name,
java.lang.String value,
java.lang.String path,
java.lang.String domain,
java.lang.String comment,
int maxAge,
boolean secure)
Constructor. |
|
CookieSetting(int version,
java.lang.String name,
java.lang.String value,
java.lang.String path,
java.lang.String domain,
java.lang.String comment,
int maxAge,
boolean secure,
boolean accessRestricted)
Constructor. |
|
CookieSetting(java.lang.String name,
java.lang.String value)
Preferred constructor. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
|
java.lang.String |
getComment()
Returns the comment for the user. |
java.lang.String |
getDescription()
Returns the description of this REST element. |
int |
getMaxAge()
Returns the maximum age in seconds. Use 0 to immediately discard an existing cookie. Use -1 to discard the cookie at the end of the session (default). |
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(java.lang.String comment)
Sets the comment for the user. |
void |
setMaxAge(int maxAge)
Sets the maximum age in seconds. Use 0 to immediately discard an existing cookie. Use -1 to discard the cookie at the end of the session (default). |
void |
setSecure(boolean secure)
Indicates if cookie should only be transmitted by secure means. |
Methods inherited from class org.restlet.data.Cookie |
---|
getDomain, getPath, getVersion, setDomain, setPath, setVersion |
Methods inherited from class org.restlet.data.Parameter |
---|
compareTo, encode, encode, getName, getValue, setName, setValue, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public CookieSetting()
public CookieSetting(int version, java.lang.String name, java.lang.String value)
version
- The cookie's version.name
- The cookie's name.value
- The cookie's value.public CookieSetting(int version, java.lang.String name, java.lang.String value, java.lang.String path, java.lang.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, java.lang.String name, java.lang.String value, java.lang.String path, java.lang.String domain, java.lang.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, java.lang.String name, java.lang.String value, java.lang.String path, java.lang.String domain, java.lang.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 CookieSetting(java.lang.String name, java.lang.String value)
name
- The cookie's name.value
- The cookie's value.Method Detail |
---|
public boolean equals(java.lang.Object obj)
equals
in class Cookie
public java.lang.String getComment()
public java.lang.String getDescription()
public int getMaxAge()
public int hashCode()
hashCode
in class Cookie
public boolean isAccessRestricted()
public boolean isSecure()
public void setAccessRestricted(boolean accessRestricted)
accessRestricted
- True if cookie access should be restrictedpublic void setComment(java.lang.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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |