Class HttpCookie

    • Constructor Detail

      • HttpCookie

        public HttpCookie​(String name,
                          String value)
        Deprecated.
      • HttpCookie

        public HttpCookie​(String name,
                          String value,
                          long maxAge)
        Deprecated.
      • HttpCookie

        public HttpCookie​(String name,
                          String value,
                          String domain,
                          String path,
                          long maxAge,
                          boolean httpOnly,
                          boolean secure)
        Deprecated.
      • HttpCookie

        public HttpCookie​(String name,
                          String value,
                          String domain,
                          String path,
                          long maxAge,
                          boolean httpOnly,
                          boolean secure,
                          String comment,
                          int version)
        Deprecated.
      • HttpCookie

        public HttpCookie​(String setCookie)
        Deprecated.
    • Method Detail

      • getName

        public String getName()
        Deprecated.
        Returns:
        the cookie name
      • getValue

        public String getValue()
        Deprecated.
        Returns:
        the cookie value
      • getComment

        public String getComment()
        Deprecated.
        Returns:
        the cookie comment
      • getDomain

        public String getDomain()
        Deprecated.
        Returns:
        the cookie domain
      • getMaxAge

        public long getMaxAge()
        Deprecated.
        Returns:
        the cookie max age in seconds
      • getPath

        public String getPath()
        Deprecated.
        Returns:
        the cookie path
      • isSecure

        public boolean isSecure()
        Deprecated.
        Returns:
        whether the cookie is valid for secure domains
      • getVersion

        public int getVersion()
        Deprecated.
        Returns:
        the cookie version
      • getSameSite

        public HttpCookie.SameSite getSameSite()
        Deprecated.
        Returns:
        the cookie SameSite enum attribute
      • isHttpOnly

        public boolean isHttpOnly()
        Deprecated.
        Returns:
        whether the cookie is valid for the http protocol only
      • isExpired

        public boolean isExpired​(long timeNanos)
        Deprecated.
        Parameters:
        timeNanos - the time to check for cookie expiration, in nanoseconds
        Returns:
        whether the cookie is expired by the given time
      • asString

        public String asString()
        Deprecated.
        Returns:
        a string representation of this cookie
      • getRFC2965SetCookie

        public String getRFC2965SetCookie()
        Deprecated.
      • getRFC6265SetCookie

        public String getRFC6265SetCookie()
        Deprecated.
      • isHttpOnlyInComment

        public static boolean isHttpOnlyInComment​(String comment)
        Deprecated.
      • getSameSiteDefault

        public static HttpCookie.SameSite getSameSiteDefault​(ServletContext context)
        Deprecated.
        Get the default value for SameSite cookie attribute, if one has been set for the given context.
        Parameters:
        context - the context to check for default SameSite value
        Returns:
        the default SameSite value or null if one does not exist
        Throws:
        IllegalStateException - if the default value is not a permitted value
      • getCommentWithoutAttributes

        public static String getCommentWithoutAttributes​(String comment)
        Deprecated.
      • getCommentWithAttributes

        public static String getCommentWithAttributes​(String comment,
                                                      boolean httpOnly,
                                                      HttpCookie.SameSite sameSite)
        Deprecated.