Class Cookie.AbstractCookieBuilder<T extends Cookie.AbstractCookieBuilder<T>>

    • Constructor Detail

      • AbstractCookieBuilder

        public AbstractCookieBuilder​(String name)
        Create a new instance.
        Parameters:
        name - the name of the cookie.
    • Method Detail

      • value

        public T value​(String value)
        Set the value of the cookie.
        Parameters:
        value - the value of the cookie.
        Returns:
        the updated builder instance.
      • version

        public T version​(int version)
        Set the version of the cookie. Defaults to Cookie.DEFAULT_VERSION
        Parameters:
        version - the version of the specification to which the cookie complies.
        Returns:
        the updated builder instance.
      • path

        public T path​(String path)
        Set the path of the cookie.
        Parameters:
        path - the URI path for which the cookie is valid.
        Returns:
        the updated builder instance.
      • domain

        public T domain​(String domain)
        Set the domain of the cookie.
        Parameters:
        domain - the host domain for which the cookie is valid.
        Returns:
        the updated builder instance.
      • build

        public abstract Cookie build()
        Build a new Cookie instance using all the configuration previously specified in this builder.
        Returns:
        a new Cookie instance.
        Throws:
        IllegalArgumentException - if name is null.