Module io.avaje.jex
Package io.avaje.jex

Interface Context.Cookie

Enclosing interface:
Context

public static interface Context.Cookie
  • Method Details

    • expired

      static Context.Cookie expired(String name)
      Return an expired cookie given the name.
      Parameters:
      name - The name of the cookie.
      Returns:
      The expired cookie
    • of

      static Context.Cookie of(String name, String value)
      Return a new cookie given the name and value.
      Parameters:
      name - The name of the cookie
      value - 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

      Context.Cookie domain(String domain)
      Set the domain.
    • maxAge

      Duration maxAge()
      Return the max age.
    • maxAge

      Context.Cookie maxAge(Duration maxAge)
      Set the max age.
    • expires

      ZonedDateTime expires()
      Return the cookie expiration.
    • expires

      Context.Cookie expires(ZonedDateTime expires)
      Set when the cookie expires.
    • path

      String path()
      Return the path.
    • path

      Context.Cookie path(String path)
      Set the path.
    • secure

      boolean secure()
      Return the secure attribute of the cookie.
    • secure

      Context.Cookie secure(boolean secure)
      Set the secure attribute of the cookie.
    • httpOnly

      boolean httpOnly()
      Return the httpOnly attribute of the cookie.
    • httpOnly

      Context.Cookie httpOnly(boolean 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.
      Overrides:
      toString in class Object