Class SetCookie.Builder

java.lang.Object
io.helidon.http.SetCookie.Builder
All Implemented Interfaces:
Builder<SetCookie.Builder,SetCookie>, Supplier<SetCookie>
Enclosing class:
SetCookie

public static final class SetCookie.Builder extends Object implements Builder<SetCookie.Builder,SetCookie>
A fluent API builder for SetCookie.
  • Method Details

    • build

      public SetCookie build()
      Description copied from interface: Builder
      Build the instance from this builder.
      Specified by:
      build in interface Builder<SetCookie.Builder,SetCookie>
      Returns:
      instance of the built type
    • expires

      public SetCookie.Builder expires(ZonedDateTime expires)
      Sets Expires parameter.
      Parameters:
      expires - an Expires parameter.
      Returns:
      Updated instance.
    • expires

      public SetCookie.Builder expires(Instant expires)
      Sets Expires parameter.
      Parameters:
      expires - an Expires parameter.
      Returns:
      Updated instance.
    • maxAge

      public SetCookie.Builder maxAge(Duration maxAge)
      Sets Max-Age parameter.
      Parameters:
      maxAge - an Max-Age parameter.
      Returns:
      Updated instance.
    • domain

      public SetCookie.Builder domain(String domain)
      Sets Domain parameter.
      Parameters:
      domain - an Domain parameter.
      Returns:
      Updated instance.
    • path

      public SetCookie.Builder path(String path)
      Sets Path parameter.
      Parameters:
      path - an Path parameter.
      Returns:
      Updated instance.
    • domainAndPath

      public SetCookie.Builder domainAndPath(URI domainAndPath)
      Sets Domain and Path parameters.
      Parameters:
      domainAndPath - an URI to specify Domain and Path parameters.
      Returns:
      Updated instance.
    • secure

      public SetCookie.Builder secure(boolean secure)
      Sets Secure parameter.
      Parameters:
      secure - an Secure parameter.
      Returns:
      Updated instance.
    • httpOnly

      public SetCookie.Builder httpOnly(boolean httpOnly)
      Sets HttpOnly parameter.
      Parameters:
      httpOnly - an HttpOnly parameter.
      Returns:
      Updated instance.
    • sameSite

      public SetCookie.Builder sameSite(SetCookie.SameSite sameSite)
      The SameSite cookie parameter.
      Parameters:
      sameSite - same site type to use
      Returns:
      updated builder