public class RedirectProtocolHandler extends Response.Listener.Empty implements ProtocolHandler
Response.Listener.Empty
Constructor and Description |
---|
RedirectProtocolHandler(HttpClient client) |
Modifier and Type | Method and Description |
---|---|
boolean |
accept(Request request,
Response response) |
Response.Listener |
getResponseListener() |
void |
onComplete(Result result)
Callback method invoked when the request and the response have been processed,
either successfully or not.
|
public RedirectProtocolHandler(HttpClient client)
public boolean accept(Request request, Response response)
accept
in interface ProtocolHandler
public Response.Listener getResponseListener()
getResponseListener
in interface ProtocolHandler
public void onComplete(Result result)
Response.Listener
result
parameter contains the request, the response, and eventual failures.
Requests may complete after response, for example in case of big uploads that are
discarded or read asynchronously by the server.
This method is always invoked after Response.Listener.onSuccess(Response)
or
Response.Listener.onFailure(Response, Throwable)
, and only when request indicates that it is completed.onComplete
in interface Response.Listener
onComplete
in class Response.Listener.Empty
result
- the result of the request / response exchangeCopyright © 1995-2012 Mort Bay Consulting. All Rights Reserved.