Class HttpCookie

  • Direct Known Subclasses:
    HttpCookie

    @DoNotInherit
    public abstract class HttpCookie
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      HttpCookie()  
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      static HttpCookie create​(java.lang.String name, java.lang.String value)  
      static HttpCookie create​(java.lang.String name, java.lang.String value, java.util.Optional<DateTime> expires, java.util.OptionalLong maxAge, java.util.Optional<java.lang.String> domain, java.util.Optional<java.lang.String> path, boolean secure, boolean httpOnly, java.util.Optional<java.lang.String> extension)
      Deprecated.
      Since 10.2.0.
      static HttpCookie create​(java.lang.String name, java.lang.String value, java.util.Optional<DateTime> expires, java.util.OptionalLong maxAge, java.util.Optional<java.lang.String> domain, java.util.Optional<java.lang.String> path, boolean secure, boolean httpOnly, java.util.Optional<java.lang.String> extension, java.util.Optional<SameSite> sameSite)  
      static HttpCookie create​(java.lang.String name, java.lang.String value, java.util.Optional<java.lang.String> domain, java.util.Optional<java.lang.String> path)  
      abstract java.util.Optional<java.lang.String> getDomain()  
      abstract java.util.Optional<DateTime> getExpires()  
      abstract java.util.Optional<java.lang.String> getExtension()  
      abstract java.util.OptionalLong getMaxAge()  
      abstract java.util.Optional<java.lang.String> getPath()  
      abstract java.util.Optional<SameSite> getSameSite()  
      abstract boolean httpOnly()  
      abstract java.lang.String name()  
      abstract HttpCookiePair pair()  
      abstract boolean secure()  
      abstract java.lang.String value()  
      abstract HttpCookie withDomain​(java.lang.String domain)
      Returns a copy of this HttpCookie instance with the given domain set.
      abstract HttpCookie withExpires​(DateTime dateTime)
      Returns a copy of this HttpCookie instance with the given expiration set.
      abstract HttpCookie withExtension​(java.lang.String extension)
      Returns a copy of this HttpCookie instance with the given extension set.
      abstract HttpCookie withHttpOnly​(boolean httpOnly)
      Returns a copy of this HttpCookie instance with the given http-only flag set.
      abstract HttpCookie withMaxAge​(long maxAge)
      Returns a copy of this HttpCookie instance with the given max age set.
      abstract HttpCookie withPath​(java.lang.String path)
      Returns a copy of this HttpCookie instance with the given path set.
      abstract HttpCookie withSameSite​(SameSite sameSite)
      Returns a copy of this HttpCookie instance with the given SameSite set.
      abstract HttpCookie withSameSite​(java.util.Optional<SameSite> sameSite)
      Returns a copy of this HttpCookie instance with the given Optional SameSite set.
      abstract HttpCookie withSecure​(boolean secure)
      Returns a copy of this HttpCookie instance with the given secure flag set.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • HttpCookie

        public HttpCookie()
    • Method Detail

      • name

        public abstract java.lang.String name()
      • value

        public abstract java.lang.String value()
      • getExpires

        public abstract java.util.Optional<DateTime> getExpires()
      • getMaxAge

        public abstract java.util.OptionalLong getMaxAge()
      • getDomain

        public abstract java.util.Optional<java.lang.String> getDomain()
      • getPath

        public abstract java.util.Optional<java.lang.String> getPath()
      • secure

        public abstract boolean secure()
      • httpOnly

        public abstract boolean httpOnly()
      • getExtension

        public abstract java.util.Optional<java.lang.String> getExtension()
      • getSameSite

        public abstract java.util.Optional<SameSite> getSameSite()
      • create

        public static HttpCookie create​(java.lang.String name,
                                        java.lang.String value)
      • create

        public static HttpCookie create​(java.lang.String name,
                                        java.lang.String value,
                                        java.util.Optional<java.lang.String> domain,
                                        java.util.Optional<java.lang.String> path)
      • create

        public static HttpCookie create​(java.lang.String name,
                                        java.lang.String value,
                                        java.util.Optional<DateTime> expires,
                                        java.util.OptionalLong maxAge,
                                        java.util.Optional<java.lang.String> domain,
                                        java.util.Optional<java.lang.String> path,
                                        boolean secure,
                                        boolean httpOnly,
                                        java.util.Optional<java.lang.String> extension,
                                        java.util.Optional<SameSite> sameSite)
      • withExpires

        public abstract HttpCookie withExpires​(DateTime dateTime)
        Returns a copy of this HttpCookie instance with the given expiration set.
      • withMaxAge

        public abstract HttpCookie withMaxAge​(long maxAge)
        Returns a copy of this HttpCookie instance with the given max age set.
      • withDomain

        public abstract HttpCookie withDomain​(java.lang.String domain)
        Returns a copy of this HttpCookie instance with the given domain set.
      • withPath

        public abstract HttpCookie withPath​(java.lang.String path)
        Returns a copy of this HttpCookie instance with the given path set.
      • withSecure

        public abstract HttpCookie withSecure​(boolean secure)
        Returns a copy of this HttpCookie instance with the given secure flag set.
      • withHttpOnly

        public abstract HttpCookie withHttpOnly​(boolean httpOnly)
        Returns a copy of this HttpCookie instance with the given http-only flag set.
      • withSameSite

        public abstract HttpCookie withSameSite​(SameSite sameSite)
        Returns a copy of this HttpCookie instance with the given SameSite set.
      • withSameSite

        public abstract HttpCookie withSameSite​(java.util.Optional<SameSite> sameSite)
        Returns a copy of this HttpCookie instance with the given Optional SameSite set.
      • withExtension

        public abstract HttpCookie withExtension​(java.lang.String extension)
        Returns a copy of this HttpCookie instance with the given extension set.