public class Cookie extends Object
All cookies must have a name and a value and can optionally have other fields set such as path, domain, etc.
(Derived from io.netty.handler.codec.http.Cookie)
NOTE: This class has been automatically generated from theoriginal
non RX-ified interface using Vert.x codegen.Modifier and Type | Field and Description |
---|---|
static TypeArg<Cookie> |
__TYPE_ARG |
Modifier and Type | Method and Description |
---|---|
static Cookie |
cookie(String name,
String value)
Create a new cookie
|
String |
encode()
Encode the cookie to a string.
|
boolean |
equals(Object o) |
Cookie |
getDelegate() |
String |
getDomain() |
String |
getName() |
String |
getPath() |
String |
getValue() |
int |
hashCode() |
boolean |
isChanged()
Has the cookie been changed? Changed cookies will be saved out in the response and sent to the browser.
|
boolean |
isFromUserAgent()
Has this Cookie been sent from the User Agent (the browser)? or was created during the executing on the request.
|
static Cookie |
newInstance(Cookie arg) |
void |
setChanged(boolean changed)
Set the cookie as being changed.
|
Cookie |
setDomain(String domain)
Sets the domain of this cookie
|
Cookie |
setHttpOnly(boolean httpOnly)
Determines if this cookie is HTTP only.
|
Cookie |
setMaxAge(long maxAge)
Sets the maximum age of this cookie in seconds.
|
Cookie |
setPath(String path)
Sets the path of this cookie.
|
Cookie |
setSecure(boolean secure)
Sets the security getStatus of this cookie
|
Cookie |
setValue(String value)
Sets the value of this cookie
|
String |
toString() |
public Cookie(Cookie delegate)
public Cookie getDelegate()
public static Cookie cookie(String name, String value)
name
- the name of the cookievalue
- the cookie valuepublic String getName()
public String getValue()
public Cookie setValue(String value)
value
- The value to setpublic Cookie setDomain(String domain)
domain
- The domain to usepublic String getDomain()
public Cookie setPath(String path)
path
- The path to use for this cookiepublic String getPath()
public Cookie setMaxAge(long maxAge)
0
is specified, this cookie will be
automatically removed by browser because it will expire immediately.
If Long
is specified, this cookie will be removed when the
browser is closed.
If you don't set this the cookie will be a session cookie and be removed when the browser is closed.maxAge
- The maximum age of this cookie in secondspublic Cookie setSecure(boolean secure)
secure
- True if this cookie is to be secure, otherwise falsepublic Cookie setHttpOnly(boolean httpOnly)
httpOnly
- True if the cookie is HTTP only, otherwise false.public String encode()
public boolean isChanged()
public void setChanged(boolean changed)
changed
- true if changedpublic boolean isFromUserAgent()
Copyright © 2019 Eclipse. All rights reserved.