Module org.elasticsearch.server
Package org.elasticsearch.rest.action
Class RestBuilderListener<Response>
java.lang.Object
org.elasticsearch.rest.action.RestActionListener<Response>
org.elasticsearch.rest.action.RestResponseListener<Response>
org.elasticsearch.rest.action.RestBuilderListener<Response>
- All Implemented Interfaces:
- ActionListener<Response>
- Direct Known Subclasses:
- RestActions.NodesResponseRestListener,- RestToXContentListener
A REST action listener that builds an 
XContentBuilder based response.- 
Nested Class SummaryNested classes/interfaces inherited from interface org.elasticsearch.action.ActionListenerActionListener.Delegating<Response,DelegateResponse>, ActionListener.DelegatingActionListener<T>, ActionListener.DelegatingFailureActionListener<T, R>, ActionListener.MappedActionListener<Response, MappedResponse>, ActionListener.RunAfterActionListener<T>, ActionListener.RunBeforeActionListener<T> 
- 
Field SummaryFields inherited from class org.elasticsearch.rest.action.RestActionListenerchannelFields inherited from interface org.elasticsearch.action.ActionListenerNOOP
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionfinal RestResponsebuildResponse(Response response) Builds the response to send back through the channel.abstract RestResponsebuildResponse(Response response, XContentBuilder builder) Builds a response to send back over the channel.Methods inherited from class org.elasticsearch.rest.action.RestResponseListenerprocessResponseMethods inherited from class org.elasticsearch.rest.action.RestActionListenerensureOpen, onFailure, onResponseMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.action.ActionListenerdelegateFailure, delegateResponse, map
- 
Constructor Details- 
RestBuilderListener
 
- 
- 
Method Details- 
buildResponseDescription copied from class:RestResponseListenerBuilds the response to send back through the channel.- Specified by:
- buildResponsein class- RestResponseListener<Response>
- Throws:
- Exception
 
- 
buildResponsepublic abstract RestResponse buildResponse(Response response, XContentBuilder builder) throws Exception Builds a response to send back over the channel. Implementors should ensure that they close the providedXContentBuilderusing theXContentBuilder.close()method.- Throws:
- Exception
 
 
-