Package com.linecorp.armeria.common
Class CookieBuilder
java.lang.Object
com.linecorp.armeria.common.CookieBuilder
Builds a
Cookie
.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Returns a newly createdCookie
with the properties set so far.Sets the domain of theCookie
.hostOnly
(boolean hostOnly) Sets whether theCookie
should only match its original host in domain matching.httpOnly
(boolean httpOnly) Sets whether theCookie
is HTTP only.maxAge
(long maxAge) Sets the maximum age of theCookie
in seconds.Sets the name of theCookie
.Sets the path of theCookie
.secure
(boolean secure) Sets the security status of theCookie
.Sets the value of theCookie
.valueQuoted
(boolean valueQuoted) Sets whether the value of theCookie
needs to be wrapped with double quotes when encoding.
-
Method Details
-
name
Sets the name of theCookie
. -
value
Sets the value of theCookie
. -
valueQuoted
-
domain
Sets the domain of theCookie
. -
path
Sets the path of theCookie
. -
maxAge
Sets the maximum age of theCookie
in seconds. If an age of0
is specified, theCookie
will be automatically removed by browser because it will expire immediately. IfCookie.UNDEFINED_MAX_AGE
is specified, thisCookie
will be removed when the browser is closed. If unspecified,Cookie.UNDEFINED_MAX_AGE
will be used.- Parameters:
maxAge
- The maximum age of thisCookie
in seconds
-
secure
Sets the security status of theCookie
. If unspecified,false
will be used. -
httpOnly
-
hostOnly
Sets whether theCookie
should only match its original host in domain matching. -
sameSite
-
build
Returns a newly createdCookie
with the properties set so far.
-