Class SimpleHttpServerCookie

java.lang.Object
org.wildfly.security.http.util.SimpleHttpServerCookie
All Implemented Interfaces:
HttpServerCookie

public class SimpleHttpServerCookie extends Object implements HttpServerCookie
A simple implementation of HttpServerCookie.
Author:
Darran Lofthouse
  • Method Details

    • getName

      public String getName()
      Description copied from interface: HttpServerCookie
      Returns the name of the cookie.
      Specified by:
      getName in interface HttpServerCookie
      Returns:
      the name of the cookie
    • getValue

      public String getValue()
      Description copied from interface: HttpServerCookie
      Returns the current value of this cookie.
      Specified by:
      getValue in interface HttpServerCookie
      Returns:
      the current value of this cookie
    • getDomain

      public String getDomain()
      Description copied from interface: HttpServerCookie
      Gets the domain name of this cookie.
      Specified by:
      getDomain in interface HttpServerCookie
      Returns:
      the domain name of this cookie
    • getMaxAge

      public int getMaxAge()
      Description copied from interface: HttpServerCookie
      Gets the maximum age in seconds of this Cookie.
      Specified by:
      getMaxAge in interface HttpServerCookie
      Returns:
      an integer specifying the maximum age of the cookie in seconds
    • getPath

      public String getPath()
      Description copied from interface: HttpServerCookie
      Returns the path on the server to which the browser returns this cookie.
      Specified by:
      getPath in interface HttpServerCookie
      Returns:
      a String specifying a path on the server
    • isSecure

      public boolean isSecure()
      Description copied from interface: HttpServerCookie
      Returns true if the browser is sending cookies only over a secure protocol, or false if the browser can send cookies using any protocol.
      Specified by:
      isSecure in interface HttpServerCookie
      Returns:
      true if the browser uses a secure protocol, false otherwise
    • getVersion

      public int getVersion()
      Description copied from interface: HttpServerCookie
      Returns the version of the protocol this cookie complies with.
      Specified by:
      getVersion in interface HttpServerCookie
      Returns:
      the version of the protocol this cookie complies with.
    • isHttpOnly

      public boolean isHttpOnly()
      Description copied from interface: HttpServerCookie
      Checks whether this cookie has been marked as HttpOnly.
      Specified by:
      isHttpOnly in interface HttpServerCookie
      Returns:
      true if this cookie has been marked as HttpOnly, false otherwise
    • newInstance

      public static HttpServerCookie newInstance(String name, String value, String domain, int maxAge, String path, boolean secure, int version, boolean httpOnly)