Interface Cookie

All Superinterfaces:
Comparable<Cookie>, Cookie
All Known Implementing Classes:
DefaultCookie

@Deprecated public interface Cookie extends Cookie
Deprecated.
Use Cookie instead.
An interface defining an HTTP cookie.
  • Method Details

    • getName

      @Deprecated String getName()
      Deprecated.
      Use Cookie.name() instead.
    • getValue

      @Deprecated String getValue()
      Deprecated.
      Use Cookie.value() instead.
    • getDomain

      @Deprecated String getDomain()
      Deprecated.
      Use Cookie.domain() instead.
    • getPath

      @Deprecated String getPath()
      Deprecated.
      Use Cookie.path() instead.
    • getComment

      @Deprecated String getComment()
      Deprecated.
      Use comment() instead.
    • comment

      @Deprecated String comment()
      Deprecated.
      Not part of RFC6265
      Returns the comment of this Cookie.
      Returns:
      The comment of this Cookie
    • setComment

      @Deprecated void setComment(String comment)
      Deprecated.
      Not part of RFC6265
      Sets the comment of this Cookie.
      Parameters:
      comment - The comment to use
    • getMaxAge

      @Deprecated int getMaxAge()
      Deprecated.
      Use maxAge() instead.
    • maxAge

      @Deprecated int maxAge()
      Deprecated.
      Not part of RFC6265
      Returns the maximum age of this Cookie in seconds or Integer.MIN_VALUE if unspecified
      Specified by:
      maxAge in interface Cookie
      Returns:
      The maximum age of this Cookie
    • setMaxAge

      @Deprecated void setMaxAge(int maxAge)
      Deprecated.
      Not part of RFC6265
      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 Integer.MIN_VALUE is specified, this Cookie will be removed when the browser is closed.
      Specified by:
      setMaxAge in interface Cookie
      Parameters:
      maxAge - The maximum age of this Cookie in seconds
    • getVersion

      @Deprecated int getVersion()
      Deprecated.
      Use version() instead.
    • version

      @Deprecated int version()
      Deprecated.
      Not part of RFC6265
      Returns the version of this Cookie.
      Returns:
      The version of this Cookie
    • setVersion

      @Deprecated void setVersion(int version)
      Deprecated.
      Not part of RFC6265
      Sets the version of this Cookie.
      Parameters:
      version - The new version to use
    • getCommentUrl

      @Deprecated String getCommentUrl()
      Deprecated.
      Use commentUrl() instead.
    • commentUrl

      @Deprecated String commentUrl()
      Deprecated.
      Not part of RFC6265
      Returns the comment URL of this Cookie.
      Returns:
      The comment URL of this Cookie
    • setCommentUrl

      @Deprecated void setCommentUrl(String commentUrl)
      Deprecated.
      Not part of RFC6265
      Sets the comment URL of this Cookie.
      Parameters:
      commentUrl - The comment URL to use
    • isDiscard

      @Deprecated boolean isDiscard()
      Deprecated.
      Not part of RFC6265
      Checks to see if this Cookie is to be discarded by the browser at the end of the current session.
      Returns:
      True if this Cookie is to be discarded, otherwise false
    • setDiscard

      @Deprecated void setDiscard(boolean discard)
      Deprecated.
      Not part of RFC6265
      Sets the discard flag of this Cookie. If set to true, this Cookie will be discarded by the browser at the end of the current session
      Parameters:
      discard - True if the Cookie is to be discarded
    • getPorts

      @Deprecated Set<Integer> getPorts()
      Deprecated.
      Use ports() instead.
    • ports

      Deprecated.
      Not part of RFC6265
      Returns the ports that this Cookie can be accessed on.
      Returns:
      The Set of ports that this Cookie can use
    • setPorts

      @Deprecated void setPorts(int... ports)
      Deprecated.
      Not part of RFC6265
      Sets the ports that this Cookie can be accessed on.
      Parameters:
      ports - The ports that this Cookie can be accessed on
    • setPorts

      @Deprecated void setPorts(Iterable<Integer> ports)
      Deprecated.
      Not part of RFC6265
      Sets the ports that this Cookie can be accessed on.
      Parameters:
      ports - The Iterable collection of ports that this Cookie can be accessed on.