Interface SetCookie.Configurator

Enclosing interface:
SetCookie

public static interface SetCookie.Configurator

A configurator used to configure a set-cookie.

Since:
1.0
Author:
Jeremy Kuhn
  • Method Details

    • name

      Sets the cookie name.

      Parameters:
      name - a cookie name
      Returns:
      the configurator
    • value

      Sets the cookie value.

      Parameters:
      value - a cookie value
      Returns:
      the configurator
    • expires

      Sets the cookie expires attribute.

      Note that the resulting date time will be serialized at GMT time zone.

      Parameters:
      expires - the expires date time
      Returns:
      the configurator
    • maxAge

      SetCookie.Configurator maxAge(int maxAge)

      Sets the cookie max age attribute in seconds.

      Parameters:
      maxAge - the cookie max age
      Returns:
      the configurator
    • domain

      Sets the cookie domain attribute.

      Parameters:
      domain - the cookie domain
      Returns:
      the configurator
    • path

      Sets the cookie path attribute.

      Parameters:
      path - the cookie path
      Returns:
      the configurator
    • secure

      SetCookie.Configurator secure(boolean secure)

      Sets the cookie secure flag attribute.

      Parameters:
      secure - the cookie secure flag
      Returns:
      the configurator
    • httpOnly

      SetCookie.Configurator httpOnly(boolean httpOnly)

      Sets the cookie http only flag attribute.

      Parameters:
      httpOnly - the cookie http only flag
      Returns:
      the configurator
    • sameSite

      Sets the cookie same site flag attribute.

      Parameters:
      sameSite - a same site policy
      Returns:
      the configurator