Interface HttpServerCookie

    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      String getDomain()
      Gets the domain name of this cookie.
      static HttpServerCookie getInstance​(String name, String value, String domain, int maxAge, String path, boolean secure, int version, boolean httpOnly)
      Returns a new instance representing HttpServerCookie
      int getMaxAge()
      Gets the maximum age in seconds of this Cookie.
      String getName()
      Returns the name of the cookie.
      String getPath()
      Returns the path on the server to which the browser returns this cookie.
      String getValue()
      Returns the current value of this cookie.
      int getVersion()
      Returns the version of the protocol this cookie complies with.
      boolean isHttpOnly()
      Checks whether this cookie has been marked as HttpOnly.
      boolean isSecure()
      Returns true if the browser is sending cookies only over a secure protocol, or false if the browser can send cookies using any protocol.
    • Method Detail

      • getInstance

        static HttpServerCookie getInstance​(String name,
                                            String value,
                                            String domain,
                                            int maxAge,
                                            String path,
                                            boolean secure,
                                            int version,
                                            boolean httpOnly)
        Returns a new instance representing HttpServerCookie
        Parameters:
        name - the name of the cookie
        value - the current value of this cookie
        domain - the domain name of this cookie
        maxAge - specifying the maximum age of the cookie in seconds
        path - a String specifying a path on the server
        secure - true if the browser uses a secure protocol, false otherwise
        version - the version of the protocol this cookie complies with
        httpOnly - true if this cookie has been marked as HttpOnly, false otherwise
        Returns:
        a new instance representing HttpServerCookie
      • getName

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

        String getValue()
        Returns the current value of this cookie.
        Returns:
        the current value of this cookie
      • getDomain

        String getDomain()
        Gets the domain name of this cookie.
        Returns:
        the domain name of this cookie
      • getMaxAge

        int getMaxAge()
        Gets the maximum age in seconds of this Cookie.
        Returns:
        an integer specifying the maximum age of the cookie in seconds
      • getPath

        String getPath()
        Returns the path on the server to which the browser returns this cookie.
        Returns:
        a String specifying a path on the server
      • isSecure

        boolean isSecure()
        Returns true if the browser is sending cookies only over a secure protocol, or false if the browser can send cookies using any protocol.
        Returns:
        true if the browser uses a secure protocol, false otherwise
      • getVersion

        int getVersion()
        Returns the version of the protocol this cookie complies with.
        Returns:
        the version of the protocol this cookie complies with.
      • isHttpOnly

        boolean isHttpOnly()
        Checks whether this cookie has been marked as HttpOnly.
        Returns:
        true if this cookie has been marked as HttpOnly, false otherwise