Interface CookieSpec

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.util.List<org.apache.http.Header> formatCookies​(java.util.List<Cookie> cookies)
      Create "Cookie" headers for an array of Cookies.
      int getVersion()
      Returns version of the state management this cookie specification conforms to.
      org.apache.http.Header getVersionHeader()
      Returns a request header identifying what version of the state management specification is understood.
      boolean match​(Cookie cookie, CookieOrigin origin)
      Determines if a Cookie matches the target location.
      java.util.List<Cookie> parse​(org.apache.http.Header header, CookieOrigin origin)
      Parse the "Set-Cookie" Header into an array of Cookies.
      void validate​(Cookie cookie, CookieOrigin origin)
      Validate the cookie according to validation rules defined by the cookie specification.
    • Method Detail

      • getVersion

        @Obsolete
        int getVersion()
        Returns version of the state management this cookie specification conforms to.
        Returns:
        version of the state management specification
      • match

        boolean match​(Cookie cookie,
                      CookieOrigin origin)
        Determines if a Cookie matches the target location.
        Parameters:
        cookie - the Cookie to be matched
        origin - the target to test against
        Returns:
        true if the cookie should be submitted with a request with given attributes, false otherwise.
      • formatCookies

        java.util.List<org.apache.http.Header> formatCookies​(java.util.List<Cookie> cookies)
        Create "Cookie" headers for an array of Cookies.
        Parameters:
        cookies - the Cookies format into a Cookie header
        Returns:
        a Header for the given Cookies.
        Throws:
        java.lang.IllegalArgumentException - if an input parameter is illegal
      • getVersionHeader

        @Obsolete
        org.apache.http.Header getVersionHeader()
        Returns a request header identifying what version of the state management specification is understood. May be null if the cookie specification does not support Cookie2 header.