public class RestStatusToXContentListener<Response extends StatusToXContentObject> extends RestToXContentListener<Response>
RestStatus
from the response.channel
Constructor and Description |
---|
RestStatusToXContentListener(RestChannel channel)
Build an instance that doesn't support responses with the status
201 CREATED . |
RestStatusToXContentListener(RestChannel channel,
java.util.function.Function<Response,java.lang.String> extractLocation)
Build an instance that does support responses with the status
201 CREATED . |
Modifier and Type | Method and Description |
---|---|
RestResponse |
buildResponse(Response response,
XContentBuilder builder) |
buildResponse, getStatus
processResponse
onFailure, onResponse
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
onFailure, onResponse, wrap
public RestStatusToXContentListener(RestChannel channel)
201 CREATED
.public RestStatusToXContentListener(RestChannel channel, java.util.function.Function<Response,java.lang.String> extractLocation)
201 CREATED
.public RestResponse buildResponse(Response response, XContentBuilder builder) throws java.lang.Exception
buildResponse
in class RestToXContentListener<Response extends StatusToXContentObject>
java.lang.Exception