ActionListener<T>public class AcknowledgedRestListener<T extends AcknowledgedResponse> extends RestBuilderListener<T>
channel| Constructor | Description |
|---|---|
AcknowledgedRestListener(RestChannel channel) |
| Modifier and Type | Method | Description |
|---|---|---|
protected void |
addCustomFields(XContentBuilder builder,
T response) |
Adds api specific fields to the rest response
Does nothing by default but can be overridden by subclasses
|
RestResponse |
buildResponse(T response,
XContentBuilder builder) |
Builds a response to send back over the channel.
|
onFailure, onResponse, toBiConsumer, wrap, wrapclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitonFailure, onResponsebuildResponseprocessResponsepublic AcknowledgedRestListener(RestChannel channel)
public RestResponse buildResponse(T response, XContentBuilder builder) throws java.lang.Exception
RestBuilderListenerXContentBuilder
using the XContentBuilder.close() method.buildResponse in class RestBuilderListener<T extends AcknowledgedResponse>java.lang.Exceptionprotected void addCustomFields(XContentBuilder builder, T response) throws java.io.IOException
java.io.IOException