@DoNotInherit
public abstract class HttpCookie
extends java.lang.Object
Constructor and Description |
---|
HttpCookie() |
Modifier and Type | Method and Description |
---|---|
static HttpCookie |
create(java.lang.String name,
java.lang.String value) |
static HttpCookie |
create(java.lang.String name,
java.lang.String value,
java.util.Optional<DateTime> expires,
java.util.OptionalLong maxAge,
java.util.Optional<java.lang.String> domain,
java.util.Optional<java.lang.String> path,
boolean secure,
boolean httpOnly,
java.util.Optional<java.lang.String> extension)
Deprecated.
Since 10.2.0. Use
create(String, String, Optional, OptionalLong, Optional, Optional, boolean, boolean, Optional, Optional) instead. |
static HttpCookie |
create(java.lang.String name,
java.lang.String value,
java.util.Optional<DateTime> expires,
java.util.OptionalLong maxAge,
java.util.Optional<java.lang.String> domain,
java.util.Optional<java.lang.String> path,
boolean secure,
boolean httpOnly,
java.util.Optional<java.lang.String> extension,
java.util.Optional<SameSite> sameSite) |
static HttpCookie |
create(java.lang.String name,
java.lang.String value,
java.util.Optional<java.lang.String> domain,
java.util.Optional<java.lang.String> path) |
abstract java.util.Optional<java.lang.String> |
getDomain() |
abstract java.util.Optional<DateTime> |
getExpires() |
abstract java.util.Optional<java.lang.String> |
getExtension() |
abstract java.util.OptionalLong |
getMaxAge() |
abstract java.util.Optional<java.lang.String> |
getPath() |
abstract java.util.Optional<SameSite> |
getSameSite() |
abstract boolean |
httpOnly() |
abstract java.lang.String |
name() |
abstract HttpCookiePair |
pair() |
abstract boolean |
secure() |
abstract java.lang.String |
value() |
abstract HttpCookie |
withDomain(java.lang.String domain)
Returns a copy of this HttpCookie instance with the given domain set.
|
abstract HttpCookie |
withExpires(DateTime dateTime)
Returns a copy of this HttpCookie instance with the given expiration set.
|
abstract HttpCookie |
withExtension(java.lang.String extension)
Returns a copy of this HttpCookie instance with the given extension set.
|
abstract HttpCookie |
withHttpOnly(boolean httpOnly)
Returns a copy of this HttpCookie instance with the given http-only flag set.
|
abstract HttpCookie |
withMaxAge(long maxAge)
Returns a copy of this HttpCookie instance with the given max age set.
|
abstract HttpCookie |
withPath(java.lang.String path)
Returns a copy of this HttpCookie instance with the given path set.
|
abstract HttpCookie |
withSameSite(java.util.Optional<SameSite> sameSite)
Returns a copy of this HttpCookie instance with the given Optional
SameSite set. |
abstract HttpCookie |
withSameSite(SameSite sameSite)
Returns a copy of this HttpCookie instance with the given
SameSite set. |
abstract HttpCookie |
withSecure(boolean secure)
Returns a copy of this HttpCookie instance with the given secure flag set.
|
public abstract java.lang.String name()
public abstract java.lang.String value()
public abstract HttpCookiePair pair()
public abstract java.util.Optional<DateTime> getExpires()
public abstract java.util.OptionalLong getMaxAge()
public abstract java.util.Optional<java.lang.String> getDomain()
public abstract java.util.Optional<java.lang.String> getPath()
public abstract boolean secure()
public abstract boolean httpOnly()
public abstract java.util.Optional<java.lang.String> getExtension()
public abstract java.util.Optional<SameSite> getSameSite()
public static HttpCookie create(java.lang.String name, java.lang.String value)
public static HttpCookie create(java.lang.String name, java.lang.String value, java.util.Optional<java.lang.String> domain, java.util.Optional<java.lang.String> path)
public static HttpCookie create(java.lang.String name, java.lang.String value, java.util.Optional<DateTime> expires, java.util.OptionalLong maxAge, java.util.Optional<java.lang.String> domain, java.util.Optional<java.lang.String> path, boolean secure, boolean httpOnly, java.util.Optional<java.lang.String> extension)
create(String, String, Optional, OptionalLong, Optional, Optional, boolean, boolean, Optional, Optional)
instead.public static HttpCookie create(java.lang.String name, java.lang.String value, java.util.Optional<DateTime> expires, java.util.OptionalLong maxAge, java.util.Optional<java.lang.String> domain, java.util.Optional<java.lang.String> path, boolean secure, boolean httpOnly, java.util.Optional<java.lang.String> extension, java.util.Optional<SameSite> sameSite)
public abstract HttpCookie withExpires(DateTime dateTime)
public abstract HttpCookie withMaxAge(long maxAge)
public abstract HttpCookie withDomain(java.lang.String domain)
public abstract HttpCookie withPath(java.lang.String path)
public abstract HttpCookie withSecure(boolean secure)
public abstract HttpCookie withHttpOnly(boolean httpOnly)
public abstract HttpCookie withSameSite(SameSite sameSite)
SameSite
set.public abstract HttpCookie withSameSite(java.util.Optional<SameSite> sameSite)
SameSite
set.public abstract HttpCookie withExtension(java.lang.String extension)