private abstract class AsyncRestServlet.AsyncRestRequest extends Response.Listener.Adapter
Response.Listener.Adapter
Modifier and Type | Field and Description |
---|---|
(package private) Utf8StringBuilder |
_content |
Constructor and Description |
---|
AsyncRestRequest() |
Modifier and Type | Method and Description |
---|---|
(package private) abstract void |
onAuctionFound(java.util.Map<java.lang.String,java.lang.String> details) |
(package private) abstract void |
onComplete() |
void |
onComplete(Result result)
Callback method invoked when the request and the response have been processed,
either successfully or not.
|
void |
onContent(Response response,
java.nio.ByteBuffer content)
Callback method invoked when the response content has been received.
|
final Utf8StringBuilder _content
public void onContent(Response response, java.nio.ByteBuffer content)
Response.ContentListener
content
buffer must be consumed
before returning from this method.onContent
in interface Response.ContentListener
onContent
in class Response.Listener.Adapter
response
- the response containing the response line data and the headerscontent
- the content bytes receivedpublic void onComplete(Result result)
Response.CompleteListener
The 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 exchangeabstract void onAuctionFound(java.util.Map<java.lang.String,java.lang.String> details)
abstract void onComplete()