Interface CookieSpec

    • Field Detail

      • PATH_DELIM_CHAR

        static final char PATH_DELIM_CHAR
        Deprecated.
        Path delimiting charachter
    • Method Detail

      • setValidDateFormats

        void setValidDateFormats​(Collection datepatterns)
        Deprecated.
        Sets the Collection of date patterns used for parsing. The String patterns must be compatible with SimpleDateFormat.
        Parameters:
        datepatterns - collection of date patterns
      • getValidDateFormats

        Collection getValidDateFormats()
        Deprecated.
        Returns the Collection of date patterns used for parsing. The String patterns are compatible with the SimpleDateFormat.
        Returns:
        collection of date patterns
      • match

        boolean match​(String host,
                      int port,
                      String path,
                      boolean secure,
                      Cookie cookie)
        Deprecated.
        Determines if a Cookie matches a location.
        Parameters:
        host - the host to which the request is being submitted
        port - the port to which the request is being submitted
        path - the path to which the request is being submitted
        secure - true if the request is using a secure connection
        cookie - the Cookie to be matched
        Returns:
        true if the cookie should be submitted with a request with given attributes, false otherwise.
      • match

        Cookie[] match​(String host,
                       int port,
                       String path,
                       boolean secure,
                       Cookie[] cookies)
        Deprecated.
        Determines which of an array of Cookies matches a location.
        Parameters:
        host - the host to which the request is being submitted
        port - the port to which the request is being submitted (currenlty ignored)
        path - the path to which the request is being submitted
        secure - true if the request is using a secure protocol
        cookies - an array of Cookies to be matched
        Returns:
        true if the cookie should be submitted with a request with given attributes, false otherwise.
      • domainMatch

        boolean domainMatch​(String host,
                            String domain)
        Deprecated.
        Performs domain-match as defined by the cookie specification.
        Parameters:
        host - The target host.
        domain - The cookie domain attribute.
        Returns:
        true if the specified host matches the given domain.
        Since:
        3.0
      • pathMatch

        boolean pathMatch​(String path,
                          String topmostPath)
        Deprecated.
        Performs path-match as defined by the cookie specification.
        Parameters:
        path - The target path.
        topmostPath - The cookie path attribute.
        Returns:
        true if the paths match
        Since:
        3.0
      • formatCookie

        String formatCookie​(Cookie cookie)
        Deprecated.
        Create a "Cookie" header value for an array of cookies.
        Parameters:
        cookie - the cookie to be formatted as string
        Returns:
        a string suitable for sending in a "Cookie" header.
      • formatCookies

        String formatCookies​(Cookie[] cookies)
                      throws IllegalArgumentException
        Deprecated.
        Create a "Cookie" header value for an array of cookies.
        Parameters:
        cookies - the Cookies to be formatted
        Returns:
        a string suitable for sending in a Cookie header.
        Throws:
        IllegalArgumentException - if an input parameter is illegal
      • formatCookieHeader

        Header formatCookieHeader​(Cookie[] cookies)
                           throws IllegalArgumentException
        Deprecated.
        Create a "Cookie" Header for an array of Cookies.
        Parameters:
        cookies - the Cookies format into a Cookie header
        Returns:
        a Header for the given Cookies.
        Throws:
        IllegalArgumentException - if an input parameter is illegal
      • formatCookieHeader

        Header formatCookieHeader​(Cookie cookie)
                           throws IllegalArgumentException
        Deprecated.
        Create a "Cookie" Header for single Cookie.
        Parameters:
        cookie - the Cookie format as a Cookie header
        Returns:
        a Cookie header.
        Throws:
        IllegalArgumentException - if an input parameter is illegal