protected class ProxyServlet.ProxyResponseListener extends Response.Listener.Adapter
|Modifier||Constructor and Description|
|Modifier and Type||Method and Description|
Callback method invoked when the response line containing HTTP version, HTTP status code and reason has been received and parsed.
Callback method invoked when the request and the response have been processed, either successfully or not.
Callback method invoked asynchronously when the response content has been received.
Callback method invoked when the response headers have been received and parsed.
onContent, onFailure, onHeader, onSuccess
public void onBegin(Response proxyResponse)
This method is the best approximation to detect when the first bytes of the response arrived to the client.
public void onHeaders(Response proxyResponse)
public void onContent(Response proxyResponse, ByteBuffer content, Callback callback)
proxyResponse- the response containing the response line data and the headers
content- the content bytes received
callback- the callback to call when the content is consumed.
public void onComplete(Result result)
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.FailureListener.onFailure(Response, Throwable), and only when request indicates that
it is completed.
Copyright © 1995–2017 Webtide. All rights reserved.