ActionListener<Response>RestStatusToXContentListenerpublic class RestToXContentListener<Response extends ToXContentObject> extends RestResponseListener<Response>
ToXContent and automatically
builds an XContent based response (wrapping the toXContent in startObject/endObject).channel| Constructor | Description |
|---|---|
RestToXContentListener(RestChannel channel) |
| Modifier and Type | Method | Description |
|---|---|---|
RestResponse |
buildResponse(Response response) |
Builds the response to send back through the channel.
|
RestResponse |
buildResponse(Response response,
XContentBuilder builder) |
|
protected RestStatus |
getStatus(Response response) |
onFailure, onResponse, toBiConsumer, wrap, wrapclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitonFailure, onResponseprocessResponsepublic RestToXContentListener(RestChannel channel)
public final RestResponse buildResponse(Response response) throws java.lang.Exception
RestResponseListenerbuildResponse in class RestResponseListener<Response extends ToXContentObject>java.lang.Exceptionpublic RestResponse buildResponse(Response response, XContentBuilder builder) throws java.lang.Exception
java.lang.Exceptionprotected RestStatus getStatus(Response response)