Interface Cookie

    • Method Detail

      • getDomain

        String getDomain()
      • isDiscard

        boolean isDiscard()
      • setDiscard

        Cookie setDiscard​(boolean discard)
      • isSecure

        boolean isSecure()
      • setSecure

        Cookie setSecure​(boolean secure)
      • getVersion

        int getVersion()
      • setVersion

        Cookie setVersion​(int version)
      • isHttpOnly

        boolean isHttpOnly()
      • setHttpOnly

        Cookie setHttpOnly​(boolean httpOnly)
      • getExpires

        Date getExpires()
      • getComment

        String getComment()
      • isSameSite

        default boolean isSameSite()
      • setSameSite

        @Deprecated(forRemoval=true)
        default Cookie setSameSite​(boolean sameSite)
        Deprecated, for removal: This API element is subject to removal in a future version.
      • getSameSiteMode

        default String getSameSiteMode()
      • setSameSiteMode

        default Cookie setSameSiteMode​(String mode)
      • getAttribute

        default String getAttribute​(String name)
        Returns the attribute associated with the name or null if no attribute is associated with the name.
        Parameters:
        name - the name of the attribute
        Returns:
        the value or null if not found
      • setAttribute

        default Cookie setAttribute​(String name,
                                    String value)
        Sets an attribute for the cookie. If the value is null, the attribute is removed. If the value is not null, the attribute is added to the attributes for this cookie. If name match pre-existing attribute, like "COOKIE_PATH_ATTR" it will override that value
        Parameters:
        name - the name of the attribute
        value - the value of the attribute or null to remove it
        Returns:
        this cookie
      • getAttributes

        default Map<String,​String> getAttributes()
        Returns an unmodifiable map of the attributes associated with this cookie.
        Returns:
        an unmodifiable map of the attributes