- Enclosing interface:
Context
public static interface Context.Cookie
-
Method Summary
Modifier and TypeMethodDescriptiondomain()Return the domain.Set the domain.static Context.CookieReturn an expired cookie given the name.expires()Return the cookie expiration.expires(ZonedDateTime expires) Set when the cookie expires.booleanhttpOnly()Return the httpOnly attribute of the cookie.httpOnly(boolean httpOnly) Set the httpOnly attribute of the cookie.maxAge()Return the max age.Set the max age.name()Return the name.static Context.CookieReturn a new cookie given the name and value.path()Return the path.Set the path.booleansecure()Return the secure attribute of the cookie.secure(boolean secure) Set the secure attribute of the cookie.toString()Returns content of the cookie as a 'Set-Cookie:' header value specified by RFC6265.value()Return the value.
-
Method Details
-
expired
Return an expired cookie given the name.- Parameters:
name- The name of the cookie.- Returns:
- The expired cookie
-
of
Return a new cookie given the name and value.- Parameters:
name- The name of the cookievalue- The cookie value- Returns:
- The new cookie
-
name
String name()Return the name. -
value
String value()Return the value. -
domain
String domain()Return the domain. -
domain
Set the domain. -
maxAge
Duration maxAge()Return the max age. -
maxAge
Set the max age. -
expires
ZonedDateTime expires()Return the cookie expiration. -
expires
Set when the cookie expires. -
path
String path()Return the path. -
path
Set the path. -
secure
boolean secure()Return the secure attribute of the cookie. -
secure
Set the secure attribute of the cookie. -
httpOnly
boolean httpOnly()Return the httpOnly attribute of the cookie. -
httpOnly
Set the httpOnly attribute of the cookie. -
toString
String toString()Returns content of the cookie as a 'Set-Cookie:' header value specified by RFC6265.
-