Top Description Inners Methods
io.netty5.handler.codec.http.headers

public Interface HttpSetCookie

extends HttpCookiePair
Known Direct Implementers
io.netty5.handler.codec.http.headers.DefaultHttpSetCookie
Imports
io.netty5.handler.codec.DateFormatter, org.jetbrains.annotations.Nullable, java.util.Date

An interface defining a set-cookie-string.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum

Method Summary

Modifier and TypeMethod and Description
public @Nullable CharSequence

Returns:

The domain of this HttpSetCookie
domain
()

Returns the domain of this HttpSetCookie.

public @Nullable CharSequence

Returns:

the expire date of this HttpSetCookie according to Expires.
expires
()

Returns the expire date of this HttpSetCookie according to Expires.

public default @Nullable Long

Returns:

The maximum age of this HttpSetCookie, but computed from the expires() attribute. Or null if no expires attribute is specified.
expiresAsMaxAge
()

Return a maxAge() value that is computed from the expires() attribute, or null if no expires attribute has been specified.

public boolean

Returns:

True if this HttpSetCookie is HTTP-only or false if it isn't
isHttpOnly
()

Checks to see if this HttpSetCookie can only be accessed via HTTP.

public boolean

Returns:

True if this HttpSetCookie is secure, otherwise false
isSecure
()

Checks to see if this HttpSetCookie is secure.

public @Nullable Long

Returns:

The maximum age of this HttpSetCookie. null if none specified.
maxAge
()

Returns the maximum age of this HttpSetCookie in seconds if specified.

public @Nullable CharSequence

Returns:

The HttpSetCookie's path
path
()

Returns the path of this HttpSetCookie.

public @Nullable HttpSetCookie.SameSite

Returns:

The value for the SameSite attribute.
sameSite
()

Get the value for the SameSite attribute.

Inherited from io.netty5.handler.codec.http.headers.HttpCookiePair:
encodedisWrappednamevalue

Method Detail

domainback to summary
public @Nullable CharSequence domain()

Returns the domain of this HttpSetCookie.

Returns:@Nullable CharSequence

The domain of this HttpSetCookie

Annotations
@Nullable
expiresback to summary
public @Nullable CharSequence expires()

Returns the expire date of this HttpSetCookie according to Expires.

Returns:@Nullable CharSequence

the expire date of this HttpSetCookie according to Expires.

Annotations
@Nullable
expiresAsMaxAgeback to summary
public default @Nullable Long expiresAsMaxAge()

Return a maxAge() value that is computed from the expires() attribute, or null if no expires attribute has been specified.

The reference for computing the max age, is the current time when this function is called. The computed time is not cached, so multiple calls may return different computed max-age values, as the moment of expiration approaches.

Returns:@Nullable Long

The maximum age of this HttpSetCookie, but computed from the expires() attribute. Or null if no expires attribute is specified.

Annotations
@Nullable
isHttpOnlyback to summary
public boolean isHttpOnly()

Checks to see if this HttpSetCookie can only be accessed via HTTP. If this returns true, the HttpSetCookie cannot be accessed through client side script - But only if the browser supports it. For more information, please look here

Returns:boolean

True if this HttpSetCookie is HTTP-only or false if it isn't

isSecureback to summary
public boolean isSecure()

Checks to see if this HttpSetCookie is secure.

Returns:boolean

True if this HttpSetCookie is secure, otherwise false

maxAgeback to summary
public @Nullable Long maxAge()

Returns the maximum age of this HttpSetCookie in seconds if specified.

Returns:@Nullable Long

The maximum age of this HttpSetCookie. null if none specified.

Annotations
@Nullable
pathback to summary
public @Nullable CharSequence path()

Returns the path of this HttpSetCookie.

Returns:@Nullable CharSequence

The HttpSetCookie's path

Annotations
@Nullable
sameSiteback to summary
public @Nullable HttpSetCookie.SameSite sameSite()

Get the value for the SameSite attribute.

Returns:@Nullable HttpSetCookie.SameSite

The value for the SameSite attribute.

Annotations
@Nullable
io.netty5.handler.codec.http.headers back to summary

public final Enum HttpSetCookie.SameSite

extends Enum<HttpSetCookie.SameSite>
Class Inheritance

Represents samesite-value for the SameSite attribute.

Field Summary

Modifier and TypeField and Description
public static final HttpSetCookie.SameSite
public static final HttpSetCookie.SameSite
public static final HttpSetCookie.SameSite

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static HttpSetCookie.SameSite
public static HttpSetCookie.SameSite[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

Laxback to summary
public static final HttpSetCookie.SameSite Lax
Noneback to summary
public static final HttpSetCookie.SameSite None
Strictback to summary
public static final HttpSetCookie.SameSite Strict

Constructor Detail

SameSiteback to summary
private SameSite()

Method Detail

valueOfback to summary
public static HttpSetCookie.SameSite valueOf(String name)
valuesback to summary
public static HttpSetCookie.SameSite[] values()