public class Cookie
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Cookie.Builder
Cookie builder.
|
static class |
Cookie.SameSite
Same site values.
|
Modifier and Type | Method and Description |
---|---|
static Cookie.Builder |
builder()
Configures and builds a cookie.
|
java.lang.String |
getDomain()
Gets the domain.
|
java.util.Date |
getExpires()
Gets the expiration date.
|
int |
getMaxAge()
Gets the max age of the cookie.
|
java.lang.String |
getName()
Gets the name.
|
java.lang.String |
getPath()
Gets the path.
|
Cookie.SameSite |
getSameSite()
Gets the same site policy.
|
java.lang.String |
getValue()
Gets the value.
|
boolean |
isHttpOnly()
Checks if the cookie is for http only.
|
boolean |
isSecure()
Checks if the cookie is secured.
|
java.lang.String |
toString() |
public static Cookie.Builder builder()
Cookie.Builder.build()
@Nullable public java.lang.String getName()
@Nullable public java.lang.String getValue()
@Nullable public java.util.Date getExpires()
@Nullable public java.lang.String getDomain()
@Nullable public java.lang.String getPath()
public int getMaxAge()
public boolean isSecure()
public boolean isHttpOnly()
@Nullable public Cookie.SameSite getSameSite()
public java.lang.String toString()
toString
in class java.lang.Object