HTTPClient
Class DefaultCookiePolicyHandler

java.lang.Object
HTTPClient.DefaultCookiePolicyHandler
- All Implemented Interfaces:
- CookiePolicyHandler
- class DefaultCookiePolicyHandler
- extends java.lang.Object
- implements CookiePolicyHandler
A simple cookie policy handler.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
accept_domains
private java.lang.String[] accept_domains
- a list of all hosts and domains from which to silently accept cookies
reject_domains
private java.lang.String[] reject_domains
- a list of all hosts and domains from which to silently reject cookies
popup
private BasicCookieBox popup
- the query popup
DefaultCookiePolicyHandler
DefaultCookiePolicyHandler()
acceptCookie
public boolean acceptCookie(Cookie cookie,
RoRequest req,
RoResponse resp)
- returns whether this cookie should be accepted. First checks the
stored lists of accept and reject domains, and if it is neither
accepted nor rejected by these then query the user via a popup.
- Specified by:
acceptCookie in interface CookiePolicyHandler
sendCookie
public boolean sendCookie(Cookie cookie,
RoRequest req)
- This handler just allows all cookies to be sent which were accepted
(i.e. no further restrictions are placed on the sending of cookies).
- Specified by:
sendCookie in interface CookiePolicyHandler
addAcceptDomain
void addAcceptDomain(java.lang.String domain)
addRejectDomain
void addRejectDomain(java.lang.String domain)