|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.ws.rs.core.Cookie
javax.ws.rs.core.NewCookie
public class NewCookie
Used to create a new HTTP cookie, transferred in a response.
Field Summary | |
---|---|
static int |
DEFAULT_MAX_AGE
Specifies that the cookie expires with the current application/browser session. |
Fields inherited from class javax.ws.rs.core.Cookie |
---|
DEFAULT_VERSION |
Constructor Summary | |
---|---|
NewCookie(Cookie cookie)
Create a new instance copying the information in the supplied cookie. |
|
NewCookie(Cookie cookie,
java.lang.String comment,
int maxAge,
boolean secure)
Create a new instance supplementing the information in the supplied cookie. |
|
NewCookie(java.lang.String name,
java.lang.String value)
Create a new instance. |
|
NewCookie(java.lang.String name,
java.lang.String value,
java.lang.String path,
java.lang.String domain,
int version,
java.lang.String comment,
int maxAge,
boolean secure)
Create a new instance. |
|
NewCookie(java.lang.String name,
java.lang.String value,
java.lang.String path,
java.lang.String domain,
java.lang.String comment,
int maxAge,
boolean secure)
Create a new instance. |
Method Summary | |
---|---|
java.lang.String |
getComment()
Get the comment associated with the cookie. |
int |
getMaxAge()
Get the maximum age of the the cookie in seconds. |
boolean |
isSecure()
Whether the cookie will only be sent over a secure connection. |
java.lang.String |
toString()
Convert the cookie to a string suitable for use as the value of the corresponding HTTP header. |
static NewCookie |
valueOf(java.lang.String value)
Creates a new instance of NewCookie by parsing the supplied string. |
Methods inherited from class javax.ws.rs.core.Cookie |
---|
getDomain, getName, getPath, getValue, getVersion |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int DEFAULT_MAX_AGE
Constructor Detail |
---|
public NewCookie(java.lang.String name, java.lang.String value)
name
- the name of the cookievalue
- the value of the cookiepublic NewCookie(java.lang.String name, java.lang.String value, java.lang.String path, java.lang.String domain, java.lang.String comment, int maxAge, boolean secure)
name
- the name of the cookievalue
- the value of the cookiepath
- the URI path for which the cookie is validdomain
- the host domain for which the cookie is validcomment
- the commentmaxAge
- the maximum age of the cookie in secondssecure
- specifies whether the cookie will only be sent over a secure connectionpublic NewCookie(java.lang.String name, java.lang.String value, java.lang.String path, java.lang.String domain, int version, java.lang.String comment, int maxAge, boolean secure)
name
- the name of the cookievalue
- the value of the cookiepath
- the URI path for which the cookie is validdomain
- the host domain for which the cookie is validversion
- the version of the specification to which the cookie compliescomment
- the commentmaxAge
- the maximum age of the cookie in secondssecure
- specifies whether the cookie will only be sent over a secure connectionpublic NewCookie(Cookie cookie)
cookie
- the cookie to clonepublic NewCookie(Cookie cookie, java.lang.String comment, int maxAge, boolean secure)
cookie
- the cookie to clonecomment
- the commentmaxAge
- the maximum age of the cookie in secondssecure
- specifies whether the cookie will only be sent over a secure connectionMethod Detail |
---|
public static NewCookie valueOf(java.lang.String value) throws java.lang.IllegalArgumentException
value
- the cookie string
java.lang.IllegalArgumentException
- if the supplied string cannot be parsedpublic java.lang.String getComment()
public int getMaxAge()
public boolean isSecure()
public java.lang.String toString()
toString
in class Cookie
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |