Package org.restlet.data
Class Cookie
java.lang.Object
org.restlet.data.Cookie
- All Implemented Interfaces:
NamedValue<String>
- Direct Known Subclasses:
CookieSetting
Cookie provided by a client. To get the list of all cookies sent by a client,
you can use the
Note that if you are on the server side and want to set a cookie on the client, you should use the
Note that when used with HTTP connectors, this class maps to the "Cookie" header.
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.
- Author:
- Jerome Louvel
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the domain name.getName()Returns the name.getPath()Returns the validity path.getValue()Returns the value.intReturns the cookie specification version.inthashCode()voidSets the domain name.voidSets the name.voidSets the validity path.voidSets the value.voidsetVersion(int version) Sets the cookie specification version.toString()
-
Constructor Details
-
Cookie
public Cookie()Default constructor. -
Cookie
Constructor.- Parameters:
version- The version number.name- The name.value- The value.
-
Cookie
Constructor.- Parameters:
version- The version number.name- The name.value- The value.path- The validity path.domain- The domain name.
-
Cookie
Constructor.- Parameters:
name- The name.value- The value.
-
-
Method Details
-
equals
-
getDomain
Returns the domain name.- Returns:
- The domain name.
-
getName
Returns the name.- Specified by:
getNamein interfaceNamedValue<String>- Returns:
- The name.
-
getPath
Returns the validity path.- Returns:
- The validity path.
-
getValue
Returns the value.- Specified by:
getValuein interfaceNamedValue<String>- Returns:
- The value.
-
getVersion
public int getVersion()Returns the cookie specification version.- Returns:
- The cookie specification version.
-
hashCode
public int hashCode() -
setDomain
Sets the domain name.- Parameters:
domain- The domain name.
-
setName
Sets the name.- Parameters:
name- The name.
-
setPath
Sets the validity path.- Parameters:
path- The validity path.
-
setValue
Sets the value.- Specified by:
setValuein interfaceNamedValue<String>- Parameters:
value- The value.
-
setVersion
public void setVersion(int version) Sets the cookie specification version.- Parameters:
version- The cookie specification version.
-
toString
-