io.vertx.rxjava3.core.http

## Class Cookie

- java.lang.Object
- - io.vertx.rxjava3.core.http.Cookie

-     public class Cookie
      extends Object

  Represents an HTTP Cookie.

  All cookies must have a name and a value and can optionally have other fields set such as path, domain, etc.

  NOTE: This class has been automatically generated from the `original` non RX-ified interface using Vert.x codegen.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static io.vertx.lang.rx.TypeArg<Cookie>` | `__TYPE_ARG`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Cookie(Cookie delegate)`
    `Cookie(Object delegate)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static Cookie` | `cookie(String name, String value)` Create a new cookie
    `String` | `encode()` Encode the cookie to a string.
    `boolean` | `equals(Object o)`
    `Cookie` | `getDelegate()`
    `String` | `getDomain()`
    `long` | `getMaxAge()`
    `String` | `getName()`
    `String` | `getPath()`
    `CookieSameSite` | `getSameSite()`
    `String` | `getValue()`
    `int` | `hashCode()`
    `boolean` | `isHttpOnly()`
    `boolean` | `isSecure()`
    `static Cookie` | `newInstance(Cookie arg)`
    `Cookie` | `setDomain(String domain)` Sets the domain of this cookie
    `Cookie` | `setHttpOnly(boolean httpOnly)` Determines if this cookie is HTTP only.
    `Cookie` | `setMaxAge(long maxAge)` Sets the maximum age of this cookie in seconds.
    `Cookie` | `setPath(String path)` Sets the path of this cookie.
    `Cookie` | `setSameSite(CookieSameSite policy)` Sets the same site of this cookie.
    `Cookie` | `setSecure(boolean secure)` Sets the security getStatus of this cookie
    `Cookie` | `setValue(String value)` Sets the value of this cookie
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### __TYPE_ARG

          public static final io.vertx.lang.rx.TypeArg<Cookie> __TYPE_ARG

  - ### Constructor Detail

    - #### Cookie

          public Cookie(Cookie delegate)

    - #### Cookie

          public Cookie(Object delegate)

  - ### Method Detail

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### getDelegate

          public Cookie getDelegate()

    - #### cookie

          public static Cookie cookie(String name,
                                      String value)

      Create a new cookie
      Parameters:
        `name` - the name of the cookie
        `value` - the cookie value
      Returns:
        the cookie

    - #### getName

          public String getName()

      Returns:
        the name of this cookie

    - #### getValue

          public String getValue()

      Returns:
        the value of this cookie

    - #### setValue

          public Cookie setValue(String value)

      Sets the value of this cookie
      Parameters:
        `value` - The value to set
      Returns:
        a reference to this, so the API can be used fluently

    - #### setDomain

          public Cookie setDomain(String domain)

      Sets the domain of this cookie
      Parameters:
        `domain` - The domain to use
      Returns:
        a reference to this, so the API can be used fluently

    - #### getDomain

          public String getDomain()

      Returns:
        the domain for the cookie

    - #### setPath

          public Cookie setPath(String path)

      Sets the path of this cookie.
      Parameters:
        `path` - The path to use for this cookie
      Returns:
        a reference to this, so the API can be used fluently

    - #### getPath

          public String getPath()

      Returns:
        the path for this cookie

    - #### setMaxAge

          public Cookie setMaxAge(long maxAge)

      Sets the maximum age of this cookie in seconds. If an age of `0` is specified, this cookie will be automatically removed by browser because it will expire immediately. If `Long` is specified, this cookie will be removed when the browser is closed. If you don't set this the cookie will be a session cookie and be removed when the browser is closed.
      Parameters:
        `maxAge` - The maximum age of this cookie in seconds
      Returns:

    - #### getMaxAge

          public long getMaxAge()

      Returns:
        the maxAge of this cookie

    - #### setSecure

          public Cookie setSecure(boolean secure)

      Sets the security getStatus of this cookie
      Parameters:
        `secure` - True if this cookie is to be secure, otherwise false
      Returns:
        a reference to this, so the API can be used fluently

    - #### isSecure

          public boolean isSecure()

      Returns:
        the security status of this cookie

    - #### setHttpOnly

          public Cookie setHttpOnly(boolean httpOnly)

      Determines if this cookie is HTTP only. If set to true, this cookie cannot be accessed by a client side script. However, this works only if the browser supports it. For for information, please look here.
      Parameters:
        `httpOnly` - True if the cookie is HTTP only, otherwise false.
      Returns:

    - #### isHttpOnly

          public boolean isHttpOnly()

      Returns:
        the http only status of this cookie

    - #### setSameSite

          public Cookie setSameSite(CookieSameSite policy)

      Sets the same site of this cookie.
      Parameters:
        `policy` - The policy should be one of `CookieSameSite`.
      Returns:
        a reference to this, so the API can be used fluently

    - #### getSameSite

          public CookieSameSite getSameSite()

      Returns:
        the SameSite policy of this cookie

    - #### encode

          public String encode()

      Encode the cookie to a string. This is what is used in the Set-Cookie header
      Returns:
        the encoded cookie

    - #### newInstance

          public static Cookie newInstance(Cookie arg)

Copyright © 2022 Eclipse. All rights reserved.