Package org.elasticsearch.action
Class ActionListenerResponseHandler<Response extends TransportResponse>
java.lang.Object
org.elasticsearch.action.ActionListenerResponseHandler<Response>
- All Implemented Interfaces:
Writeable.Reader<Response>
,TransportResponseHandler<Response>
public class ActionListenerResponseHandler<Response extends TransportResponse>
extends Object
implements TransportResponseHandler<Response>
A simple base class for action response listeners, defaulting to using the SAME executor (as its
very common on response handlers).
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.transport.TransportResponseHandler
TransportResponseHandler.Empty
-
Constructor Summary
ConstructorDescriptionActionListenerResponseHandler(ActionListener<? super Response> listener, Writeable.Reader<Response> reader)
ActionListenerResponseHandler(ActionListener<? super Response> listener, Writeable.Reader<Response> reader, String executor)
-
Method Summary
Modifier and TypeMethodDescriptionexecutor()
void
void
handleResponse(Response response)
read(StreamInput in)
ReadV
-type value from a stream.toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.elasticsearch.transport.TransportResponseHandler
wrap
-
Constructor Details
-
ActionListenerResponseHandler
public ActionListenerResponseHandler(ActionListener<? super Response> listener, Writeable.Reader<Response> reader, String executor) -
ActionListenerResponseHandler
public ActionListenerResponseHandler(ActionListener<? super Response> listener, Writeable.Reader<Response> reader)
-
-
Method Details
-
handleResponse
- Specified by:
handleResponse
in interfaceTransportResponseHandler<Response extends TransportResponse>
-
handleException
- Specified by:
handleException
in interfaceTransportResponseHandler<Response extends TransportResponse>
-
executor
- Specified by:
executor
in interfaceTransportResponseHandler<Response extends TransportResponse>
-
read
Description copied from interface:Writeable.Reader
ReadV
-type value from a stream.- Specified by:
read
in interfaceWriteable.Reader<Response extends TransportResponse>
- Parameters:
in
- Input to read the value from- Throws:
IOException
-
toString
-