Class BasicClientCookie2

    • Constructor Detail

      • BasicClientCookie2

        public BasicClientCookie2​(java.lang.String name,
                                  java.lang.String value)
        Default Constructor taking a name and a value. The value may be null.
        Parameters:
        name - The name.
        value - The value.
    • Method Detail

      • setPorts

        public void setPorts​(int[] ports)
        Description copied from interface: SetCookie2
        Sets the Port attribute. It restricts the ports to which a cookie may be returned in a Cookie request header.
        Specified by:
        setPorts in interface SetCookie2
      • setCommentURL

        public void setCommentURL​(java.lang.String commentURL)
        Description copied from interface: SetCookie2
        If a user agent (web browser) presents this cookie to a user, the cookie's purpose will be described by the information at this URL.
        Specified by:
        setCommentURL in interface SetCookie2
      • setDiscard

        public void setDiscard​(boolean discard)
        Description copied from interface: SetCookie2
        Set the Discard attribute. Note: Discard attribute overrides Max-age.
        Specified by:
        setDiscard in interface SetCookie2
        See Also:
        Cookie.isPersistent()
      • isPersistent

        public boolean isPersistent()
        Description copied from class: BasicClientCookie
        Returns false if the cookie should be discarded at the end of the "session"; true otherwise.
        Specified by:
        isPersistent in interface Cookie
        Overrides:
        isPersistent in class BasicClientCookie
        Returns:
        false if the cookie should be discarded at the end of the "session"; true otherwise
      • isExpired

        public boolean isExpired​(java.util.Date date)
        Description copied from class: BasicClientCookie
        Returns true if this cookie has expired.
        Specified by:
        isExpired in interface Cookie
        Overrides:
        isExpired in class BasicClientCookie
        Parameters:
        date - Current time
        Returns:
        true if the cookie has expired.
      • clone

        public java.lang.Object clone()
                               throws java.lang.CloneNotSupportedException
        Overrides:
        clone in class BasicClientCookie
        Throws:
        java.lang.CloneNotSupportedException