All Packages Class Hierarchy This Package Previous Next Index
Interface HTTPClient.CookiePolicyHandler
- public interface CookiePolicyHandler
This is the interface that a cookie policy handler must implement. A
policy handler allows you to control which cookies are accepted and
which are sent.
- Since:
- V0.3
- Version:
- 0.3 30/01/1998
- Author:
- Ronald Tschalär
- See Also:
- setCookiePolicyHandler
-
acceptCookie(Cookie, RoRequest, RoResponse)
- This method is called for each cookie that a server tries to set via
the Set-Cookie header.
-
sendCookie(Cookie, RoRequest)
- 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).
acceptCookie
public abstract boolean acceptCookie(Cookie cookie,
RoRequest req,
RoResponse resp)
- This method is called for each cookie that a server tries to set via
the Set-Cookie header. This enables you to implement your own
cookie acceptance policy.
- Parameters:
- cookie - the cookie in question
- req - the request sent which prompted the response
- resp - the response which is trying to set the cookie
- Returns:
- true if this cookie should be accepted, false if it is to
be rejected.
sendCookie
public abstract 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). This enables you to control the sending of cookies.
- Parameters:
- cookie - the cookie in question
- req - the request this cookie is to be sent with
- Returns:
- true if this cookie should be sent, false if it is to be
ignored.
All Packages Class Hierarchy This Package Previous Next Index