protected class ProxyServlet.ProxyResponseListener extends Response.Listener.Adapter
Response.Listener.Adapter
Modifier | Constructor and Description |
---|---|
protected |
ProxyServlet.ProxyResponseListener(HttpServletRequest request,
HttpServletResponse response) |
Modifier and Type | Method and Description |
---|---|
void |
onBegin(Response proxyResponse)
Callback method invoked when the response line containing HTTP version,
HTTP status code and reason has been received and parsed.
|
void |
onComplete(Result result)
Callback method invoked when the request and the response have been processed,
either successfully or not.
|
void |
onContent(Response proxyResponse,
ByteBuffer content,
Callback callback)
Callback method invoked asynchronously when the response content has been received.
|
void |
onHeaders(Response proxyResponse)
Callback method invoked when the response headers have been received and parsed.
|
onContent, onFailure, onHeader, onSuccess
protected ProxyServlet.ProxyResponseListener(HttpServletRequest request, HttpServletResponse response)
public void onBegin(Response proxyResponse)
Response.BeginListener
onBegin
in interface Response.BeginListener
onBegin
in class Response.Listener.Adapter
proxyResponse
- the response containing the response line datapublic void onHeaders(Response proxyResponse)
Response.HeadersListener
onHeaders
in interface Response.HeadersListener
onHeaders
in class Response.Listener.Adapter
proxyResponse
- the response containing the response line data and the headerspublic void onContent(Response proxyResponse, ByteBuffer content, Callback callback)
Response.AsyncContentListener
onContent
in interface Response.AsyncContentListener
onContent
in class Response.Listener.Adapter
proxyResponse
- the response containing the response line data and the headerscontent
- the content bytes receivedcallback
- the callback to call when the content is consumed.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.