com.sonalb.net.http.cookie
Interface CookieParser

All Known Implementing Classes:
RFC2965CookieParser

public interface CookieParser

Interface definition for cookie-parsing and specification implementations.

Author:
Sonal Bansal
See Also:
Client.setCookieParser(CookieParser)

Method Summary
 boolean allowedCookie(Cookie c, java.net.URL url)
          Checks whether a request to the given URL is allowed to return the specified Cookie.
 Header getCookieHeaders(CookieJar cj)
          Converts the Cookies in the CookieJar to a set of headers suitable to be sent along with an HTTP request.
 CookieJar parseCookies(Header h, java.net.URL url)
          Converts the headers in an HTTP response into a CookieJar of Cookie objects.
 boolean sendCookieWithURL(Cookie c, java.net.URL url, boolean bRespectExpires)
          Checks whether the given Cookie can be sent alongwith a request for the given URL.
 

Method Detail

getCookieHeaders

Header getCookieHeaders(CookieJar cj)
Converts the Cookies in the CookieJar to a set of headers suitable to be sent along with an HTTP request.


allowedCookie

boolean allowedCookie(Cookie c,
                      java.net.URL url)
Checks whether a request to the given URL is allowed to return the specified Cookie.


parseCookies

CookieJar parseCookies(Header h,
                       java.net.URL url)
                       throws MalformedCookieException
Converts the headers in an HTTP response into a CookieJar of Cookie objects.

Throws:
MalformedCookieException

sendCookieWithURL

boolean sendCookieWithURL(Cookie c,
                          java.net.URL url,
                          boolean bRespectExpires)
Checks whether the given Cookie can be sent alongwith a request for the given URL.