@Internal public class NettyCookie extends Object implements Cookie
| Constructor and Description |
|---|
NettyCookie(io.netty.handler.codec.http.cookie.Cookie nettyCookie) |
NettyCookie(String name,
String value) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Cookie o) |
Cookie |
domain(String domain)
Sets the domain of the cookie.
|
String |
getDomain()
Gets the domain name of this Cookie.
|
long |
getMaxAge() |
String |
getName() |
io.netty.handler.codec.http.cookie.Cookie |
getNettyCookie() |
String |
getPath()
The path of the cookie.
|
String |
getValue() |
Cookie |
httpOnly(boolean httpOnly)
Sets whether the cookie is HTTP-Only.
|
boolean |
isHttpOnly()
Checks to see if this
Cookie can only be accessed via HTTP. |
boolean |
isSecure() |
Cookie |
maxAge(long maxAge)
Sets the max age of the cookie in seconds.
|
Cookie |
path(String path)
Sets the path of the cookie.
|
Cookie |
secure(boolean secure)
Sets whether the cookie is secure.
|
Cookie |
value(String value)
Sets the value.
|
public NettyCookie(io.netty.handler.codec.http.cookie.Cookie nettyCookie)
nettyCookie - The Netty cookiepublic io.netty.handler.codec.http.cookie.Cookie getNettyCookie()
public String getDomain()
CookieDomain names are formatted according to RFC 2109.
public String getPath()
Cookiepublic boolean isHttpOnly()
CookieCookie can only be accessed via HTTP.
If this returns true, the Cookie cannot be accessed through client side script - But only if the
browser supports it.
See here for reference
isHttpOnly in interface CookieCookie is HTTP-only or false if it isn'tpublic boolean isSecure()
public long getMaxAge()
@Nonnull public Cookie maxAge(long maxAge)
Cookie@Nonnull public Cookie value(@Nonnull String value)
Cookie@Nonnull public Cookie domain(String domain)
Cookie@Nonnull public Cookie path(String path)
Cookie@Nonnull public Cookie secure(boolean secure)
Cookie@Nonnull public Cookie httpOnly(boolean httpOnly)
Cookiepublic int compareTo(Cookie o)
compareTo in interface Comparable<Cookie>