|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.restlet.data.Cookie
public class Cookie
Cookie provided by a client. To get the list of all cookies sent by a client,
you can use the Request.getCookies()
method.
Note that if you are on the server side and want to set a cookie on the
client, you should use the CookieSetting
class instead.
Note that when used with HTTP connectors, this class maps to the "Cookie"
header.
Request.getCookies()
,
User Guide -
Getting parameter valuesConstructor Summary | |
---|---|
Cookie()
Default constructor. |
|
Cookie(int version,
String name,
String value)
Constructor. |
|
Cookie(int version,
String name,
String value,
String path,
String domain)
Constructor. |
|
Cookie(String name,
String value)
Constructor. |
Method Summary | |
---|---|
boolean |
equals(Object obj)
|
String |
getDomain()
Returns the domain name. |
String |
getName()
Returns the name. |
String |
getPath()
Returns the validity path. |
String |
getValue()
Returns the value. |
int |
getVersion()
Returns the cookie specification version. |
int |
hashCode()
|
void |
setDomain(String domain)
Sets the domain name. |
void |
setName(String name)
Sets the name. |
void |
setPath(String path)
Sets the validity path. |
void |
setValue(String value)
Sets the value. |
void |
setVersion(int version)
Sets the cookie specification version. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Cookie()
public Cookie(int version, String name, String value)
version
- The version number.name
- The name.value
- The value.public Cookie(int version, String name, String value, String path, String domain)
version
- The version number.name
- The name.value
- The value.path
- The validity path.domain
- The domain name.public Cookie(String name, String value)
name
- The name.value
- The value.Method Detail |
---|
public boolean equals(Object obj)
equals
in class Object
public String getDomain()
public String getName()
getName
in interface NamedValue<String>
public String getPath()
public String getValue()
getValue
in interface NamedValue<String>
public int getVersion()
public int hashCode()
hashCode
in class Object
public void setDomain(String domain)
domain
- The domain name.public void setName(String name)
name
- The name.public void setPath(String path)
path
- The validity path.public void setValue(String value)
setValue
in interface NamedValue<String>
value
- The value.public void setVersion(int version)
version
- The cookie specification version.public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |