java.lang.Object
io.helidon.http.SetCookie
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA fluent API builder forSetCookie.static enumThe SameSite attribute of the Set-Cookie HTTP response header allows you to declare if your cookie should be restricted to a first-party or same-site context. -
Method Summary
Modifier and TypeMethodDescriptionstatic SetCookie.BuilderCreates a new fluent API builder using another cookie.static SetCookie.BuilderCreates a new fluent API builder.static SetCookieCreates new instance.domain()Domain of cookie.booleanexpires()Expiration of cookie.inthashCode()booleanhttpOnly()HttpOnly attribute of cookie.maxAge()Max age of cookie.name()Name of the cookie.static SetCookieParses new instance ofSetCookiefrom the String representation.path()Path of cookie.sameSite()Same site attribute of cookie.booleansecure()Secure attribute of cookie.text()Text representation of this cookie.toString()Returns content of this instance as a 'Set-Cookie:' header value specified by RFC6265.value()Value of the cookie.
-
Method Details
-
builder
Creates a new fluent API builder.- Parameters:
name- a cookie name.value- a cookie value.- Returns:
- a new fluent API builder
-
builder
Creates a new fluent API builder using another cookie.- Parameters:
setCookie- the other cookie- Returns:
- a new fluent API builder
-
parse
Parses new instance ofSetCookiefrom the String representation.- Parameters:
setCookie- string representation- Returns:
- new instance
-
create
Creates new instance.- Parameters:
name- a cookie name.value- a cookie value.- Returns:
- a new instance with just the name and value configured
-
name
Name of the cookie.- Returns:
- the name.
-
value
Value of the cookie.- Returns:
- value
-
expires
Expiration of cookie.- Returns:
- expiration if defined
-
maxAge
Max age of cookie.- Returns:
- max age if defined
-
domain
Domain of cookie.- Returns:
- domain if defined
-
path
Path of cookie.- Returns:
- path if defined
-
secure
public boolean secure()Secure attribute of cookie.- Returns:
- whether secure was set
-
httpOnly
public boolean httpOnly()HttpOnly attribute of cookie.- Returns:
- whether
HttpOnlywas set
-
sameSite
Same site attribute of cookie.- Returns:
- same site if defined
-
text
Text representation of this cookie.- Returns:
- cookie text
-
toString
Returns content of this instance as a 'Set-Cookie:' header value specified by RFC6265. -
equals
-
hashCode
public int hashCode()
-