Class SimpleHttpCookie.Builder

    • Constructor Detail

      • Builder

        public Builder​(String name,
                       String value)
        Creates an HTTP cookie builder given a key and value.
        Parameters:
        name - Name of the cookie
        value - Value of the cookie
        Since:
        02.03.00
    • Method Detail

      • getName

        public final String getName()
        Returns the name of the cookie.
        Returns:
        cookie name
        Since:
        02.00.00
      • getValue

        public final String getValue()
        Returns the value of the cookie.
        Returns:
        cookie value
        Since:
        02.03.00
      • getDomain

        public final String getDomain()
        Returns the domain to send the cookie to.
        Returns:
        domain to send the cookie to
        Since:
        02.03.00
        See Also:
        setDomain(String)
      • setDomain

        public final SimpleHttpCookie.Builder setDomain​(String domain)
        Sets the domain of the cookie.
        Parameters:
        domain - what domain to send the cookie to
        Returns:
        cookie builder
        Since:
        02.03.00
        See Also:
        getDomain()
      • getPath

        public final String getPath()
        Returns the path to send the cookie to.
        Returns:
        what path to send the cookie to
        Since:
        02.03.00
        See Also:
        setPath(String)
      • setPath

        public final SimpleHttpCookie.Builder setPath​(String path)
        Sets the path of the cookie.
        Parameters:
        path - what path to send the cookie to
        Returns:
        cookie builder
        Since:
        02.03.00
        See Also:
        getPath()
      • isSameSite

        public final String isSameSite()
        Returns if the cookie should be prevented from being sent cross-site.
        Returns:
        if the cookie should be prevented from being sent cross-site.
        Since:
        02.03.00
        See Also:
        setSameSite(String)
      • setSameSite

        public final SimpleHttpCookie.Builder setSameSite​(String sameSite)
        Sets if the cookie should be prevented from being sent cross-site.
        Parameters:
        sameSite - if the cookie should be prevented from being sent cross-site
        Returns:
        cookie builder
        Since:
        02.03.00
        See Also:
        isSameSite()
      • isSecure

        public final boolean isSecure()
        Returns if the cookie must be sent over a secure/HTTPS protocol.
        Returns:
        if the cookie must be sent over a secure/HTTPS protocol
        Since:
        02.03.00
        See Also:
        isSecure()
      • setSecure

        public final SimpleHttpCookie.Builder setSecure​(boolean secure)
        Sets if the cookie must be sent over a secure/HTTPS protocol.
        Parameters:
        secure - if the cookie must be sent over a secure/HTTPS protocol.
        Returns:
        cookie builder
        Since:
        02.03.00
        See Also:
        setSecure(boolean)
      • isHttpOnly

        public final boolean isHttpOnly()
        Returns if only the server should have access to the cookies.
        Returns:
        if only the server should have access to the cookies.
        Since:
        02.03.00
        See Also:
        setHttpOnly(boolean)
      • setHttpOnly

        public final SimpleHttpCookie.Builder setHttpOnly​(boolean httpOnly)
        Sets if only the server should have access to the cookies.
        Parameters:
        httpOnly - if only the server should have access to the cookies
        Returns:
        cookie builder
        Since:
        02.03.00
        See Also:
        isHttpOnly()
      • build

        public final SimpleHttpCookie build()
        Returns the completed cookie.
        Returns:
        simple http cookie
        Since:
        02.03.00