public interface Cookie
Modifier and Type | Interface and Description |
---|---|
static class |
Cookie.Builder
A builder of
Cookie . |
Modifier and Type | Method and Description |
---|---|
default Timestamp |
creationTime()
Returns the cookie creation time since UNIX epoch.
|
default java.lang.String |
domain()
Returns a string that represents the domain name of this cookie or an empty string if the
domain name for this cookie is not specified.
|
default Timestamp |
expirationTime()
Returns the cookie expiration time since UNIX epoch.
|
default boolean |
isHttpOnly()
Returns
true if the cookie is considered HTTP only. |
default boolean |
isSecure()
Returns
true if the cookie is restricted to a secure protocol (HTTPS or WSS) or
false if it can be sent using any protocol. |
default java.lang.String |
name()
Returns a string that represents the name of this cookie.
|
static Cookie.Builder |
newBuilder()
Creates a new
Cookie builder. |
default java.lang.String |
path()
Returns a string that represents the path that must exist in the URL of a request in order to
send this cookie to the server.
|
default java.lang.String |
value()
Returns a string that represents the value of this cookie or an empty string if the cookie
value is not specified.
|
static Cookie.Builder newBuilder()
Cookie
builder.Cookie.Builder
instancedefault java.lang.String name()
default java.lang.String value()
default java.lang.String domain()
default java.lang.String path()
default boolean isSecure()
true
if the cookie is restricted to a secure protocol (HTTPS or WSS) or
false
if it can be sent using any protocol.default boolean isHttpOnly()
true
if the cookie is considered HTTP only. It means that the cookie contains
the HttpOnly
attribute and should not be accessible from JavaScript.default Timestamp creationTime()
default Timestamp expirationTime()
Timestamp.NONE
for session cookies.