RestHandlers that translate requests from REST into internal requests and start them then wait for them to complete and then translate them back into REST. And some classes to support them.
ClassDescriptionResponse listener for REST requests which dispatches the serialization of the response off of the thread on which the response was received, since that thread is often a transport thread and XContent serialization might be expensive.RestActionListener<Response>An action listener that requires
RestActionListener.processResponse(Object)to be implemented and will automatically handle failures.RestBuilderListener<Response>A REST action listener that builds an
XContentBuilderbased response.RestResponseListener<Response>A REST enabled action listener that has a basic onFailure implementation, and requires sub classes to only implement
RestResponseListener.buildResponse(Object).Content listener that extracts that
RestStatusfrom the response.A REST based action listener that requires the response to implement
ToXContentObjectand automatically builds an XContent based response.