Package org.eclipse.jetty.http
Class HttpCookie.Builder
java.lang.Object
org.eclipse.jetty.http.HttpCookie.Builder
- Enclosing interface:
- HttpCookie
A builder for HttpCookie
instances.
The typical usage is to use one of the
build methods
to obtain the builder, and then chain method calls to
customize the cookie attributes and finally calling
the build()
method, for example:
HttpCookie cookie = HttpCookie.build("name", "value")
.maxAge(24 * 60 * 60)
.domain("example.com")
.path("/")
.build();
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
httpOnly
(boolean httpOnly) maxAge
(long maxAge) partitioned
(boolean partitioned) sameSite
(HttpCookie.SameSite sameSite) secure
(boolean secure)
-
Method Details
-
attribute
-
comment
-
domain
-
httpOnly
-
maxAge
-
expires
-
path
-
secure
-
sameSite
-
partitioned
-
build
- Returns:
- an immutable
HttpCookie
instance.
-