public class HttpCookie extends Object
Constructor and Description |
---|
HttpCookie(String name,
String value,
String path,
String domain,
String expires,
Integer maxAge,
Boolean secure,
Boolean httpOnly)
Constructs a new fully specified cookie.
|
Modifier and Type | Method and Description |
---|---|
String |
getDomain()
Returns the domain to which this cookie belongs.
|
String |
getExpires()
Returns when the cookie expires.
|
Integer |
getMaxAge()
Returns how long the cookie can live for.
|
String |
getName()
Returns the name of the cookie.
|
String |
getPath()
Returns the path within the domain to which this cookie belongs.
|
String |
getValue()
Returns the value of the cookie.
|
Boolean |
isHttpOnly()
Returns whether or not this cookie can only be read by a server.
|
Boolean |
isSecure()
Returns whether or not this cookie can only be sent to HTTPS servers.
|
public HttpCookie(@Nonnull String name, @Nonnull String value, @Nullable String path, @Nullable String domain, @Nullable String expires, @Nullable Integer maxAge, @Nullable Boolean secure, @Nullable Boolean httpOnly)
name
- the name of the cookie.value
- the value of the cookie.path
- the path within the domain to which this cookie belongs.domain
- the domain to which this cookie belongs.expires
- when the cookie expires.maxAge
- how long the cookie can live for.secure
- whether or not this cookie can only be sent to HTTPS servers.httpOnly
- whether or not this cookie can only be read by a server.@Nonnull public String getName()
@Nonnull public String getValue()
@Nullable public String getPath()
@Nullable public String getDomain()
@Nullable public String getExpires()
@Nullable public Integer getMaxAge()
@Nullable public Boolean isSecure()