public static interface ResponseCookie.ResponseCookieBuilder
Modifier and Type | Method and Description |
---|---|
ResponseCookie |
build()
Create the HttpCookie.
|
ResponseCookie.ResponseCookieBuilder |
domain(java.lang.String domain)
Set the cookie "Domain" attribute.
|
ResponseCookie.ResponseCookieBuilder |
httpOnly(boolean httpOnly)
Add the "HttpOnly" attribute to the cookie.
|
ResponseCookie.ResponseCookieBuilder |
maxAge(java.time.Duration maxAge)
Set the cookie "Max-Age" attribute.
|
ResponseCookie.ResponseCookieBuilder |
maxAge(long maxAgeSeconds)
Variant of
maxAge(Duration) accepting a value in seconds. |
ResponseCookie.ResponseCookieBuilder |
path(java.lang.String path)
Set the cookie "Path" attribute.
|
ResponseCookie.ResponseCookieBuilder |
secure(boolean secure)
Add the "Secure" attribute to the cookie.
|
ResponseCookie.ResponseCookieBuilder maxAge(java.time.Duration maxAge)
A positive value indicates when the cookie should expire relative to the current time. A value of 0 means the cookie should expire immediately. A negative value results in no "Max-Age" attribute in which case the cookie is removed when the browser is closed.
ResponseCookie.ResponseCookieBuilder maxAge(long maxAgeSeconds)
maxAge(Duration)
accepting a value in seconds.ResponseCookie.ResponseCookieBuilder path(java.lang.String path)
ResponseCookie.ResponseCookieBuilder domain(java.lang.String domain)
ResponseCookie.ResponseCookieBuilder secure(boolean secure)
ResponseCookie.ResponseCookieBuilder httpOnly(boolean httpOnly)
ResponseCookie build()