Package org.elasticsearch.rest.action
Class RestResponseListener<Response>
- java.lang.Object
-
- org.elasticsearch.rest.action.RestActionListener<Response>
-
- org.elasticsearch.rest.action.RestResponseListener<Response>
-
- All Implemented Interfaces:
ActionListener<Response>
- Direct Known Subclasses:
RestBuilderListener
,RestToXContentListener
public abstract class RestResponseListener<Response> extends RestActionListener<Response>
A REST enabled action listener that has a basic onFailure implementation, and requires sub classes to only implementbuildResponse(Object)
.
-
-
Field Summary
-
Fields inherited from class org.elasticsearch.rest.action.RestActionListener
channel
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
RestResponseListener(RestChannel channel)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract RestResponse
buildResponse(Response response)
Builds the response to send back through the channel.protected void
processResponse(Response response)
-
Methods inherited from class org.elasticsearch.rest.action.RestActionListener
onFailure, onResponse
-
-
-
-
Constructor Detail
-
RestResponseListener
protected RestResponseListener(RestChannel channel)
-
-
Method Detail
-
processResponse
protected final void processResponse(Response response) throws java.lang.Exception
- Specified by:
processResponse
in classRestActionListener<Response>
- Throws:
java.lang.Exception
-
buildResponse
public abstract RestResponse buildResponse(Response response) throws java.lang.Exception
Builds the response to send back through the channel.- Throws:
java.lang.Exception
-
-