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 |
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
- Parameters:
cookie - the cookie in questionreq - the requestresp - the response- Returns:
- true if we accept this cookie.
sendCookie
public boolean sendCookie(Cookie cookie,
RoRequest req)
- Description copied from interface:
CookiePolicyHandler
- This method is called for each cookie that is eligible for sending
with a request (according to the matching rules for the path, domain,
protocol, etc). This enables you to control the sending of cookies.
- Specified by:
sendCookie in interface CookiePolicyHandler
- Returns:
- true
addAcceptDomain
void addAcceptDomain(java.lang.String domain)
addRejectDomain
void addRejectDomain(java.lang.String domain)