public class RedirectProtocolHandler extends Response.Listener.Adapter implements ProtocolHandler
Response.Listener.Adapter
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.CompleteListener
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.SuccessListener.onSuccess(Response)
or
Response.FailureListener.onFailure(Response, Throwable)
, and only when request indicates that
it is completed.onComplete
in interface Response.CompleteListener
onComplete
in class Response.Listener.Adapter
result
- the result of the request / response exchangeCopyright © 1995-2015 Webtide. All Rights Reserved.