Package org.elasticsearch.rest.action
Class DispatchingRestToXContentListener<Response extends org.elasticsearch.common.xcontent.ToXContentObject>
java.lang.Object
org.elasticsearch.rest.action.RestActionListener<Response>
org.elasticsearch.rest.action.DispatchingRestToXContentListener<Response>
- All Implemented Interfaces:
ActionListener<Response>
public class DispatchingRestToXContentListener<Response extends org.elasticsearch.common.xcontent.ToXContentObject> extends RestActionListener<Response>
Response 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.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.action.ActionListener
ActionListener.MappedActionListener<Response,MappedResponse> -
Field Summary
Fields inherited from class org.elasticsearch.rest.action.RestActionListener
channel -
Constructor Summary
Constructors Constructor Description DispatchingRestToXContentListener(java.util.concurrent.ExecutorService executor, RestChannel channel, RestRequest restRequest) -
Method Summary
Modifier and Type Method Description protected org.elasticsearch.common.xcontent.ToXContent.ParamsgetParams()protected voidprocessResponse(Response response)Methods inherited from class org.elasticsearch.rest.action.RestActionListener
onFailure, onResponseMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.action.ActionListener
map
-
Constructor Details
-
DispatchingRestToXContentListener
public DispatchingRestToXContentListener(java.util.concurrent.ExecutorService executor, RestChannel channel, RestRequest restRequest)
-
-
Method Details
-
getParams
protected org.elasticsearch.common.xcontent.ToXContent.Params getParams() -
processResponse
- Specified by:
processResponsein classRestActionListener<Response extends org.elasticsearch.common.xcontent.ToXContentObject>
-