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.


Constructor Summary
(package private) DefaultCookiePolicyHandler()
           
 
Method Summary
TypeMethod
 boolean acceptCookie(Cookie cookie, RoRequest req, RoResponse resp)
          returns whether this cookie should be accepted.
(package private)  void addAcceptDomain(java.lang.String domain)
           
(package private)  void addRejectDomain(java.lang.String domain)
           
 boolean sendCookie(Cookie cookie, RoRequest req)
          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).
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultCookiePolicyHandler

DefaultCookiePolicyHandler()
Method Detail

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 question
req - the request
resp - 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)