Module org.elasticsearch.server
Package org.elasticsearch.action
Class DelegatingActionListener<Response,DelegateResponse>
java.lang.Object
org.elasticsearch.action.DelegatingActionListener<Response,DelegateResponse>
- All Implemented Interfaces:
ActionListener<Response>
- Direct Known Subclasses:
ContextPreservingActionListener,CountDownActionListener,FinalizeSnapshotContext,GroupedActionListener,SearchExecutionStatsCollector,SnapshotShardContext
public abstract class DelegatingActionListener<Response,DelegateResponse>
extends Object
implements ActionListener<Response>
A wrapper around an
ActionListener L that by default delegates failures to L's ActionListener.onFailure(java.lang.Exception)
method. The wrapper also provides a toString() implementation that describes this class and the delegate.
This is a useful base class for creating ActionListener wrappers that override the ActionListener.onResponse(Response) handling, with access to
L, while retaining all of L's other handling. It can also be useful to override other methods to do new work with access
to L.
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.action.ActionListener
delegateFailure, delegateFailureAndWrap, delegateFailureIgnoreResponseAndWrap, delegateResponse, map, onResponse, safeMap
-
Field Details
-
delegate
-
-
Constructor Details
-
DelegatingActionListener
-
-
Method Details
-
onFailure
Description copied from interface:ActionListenerComplete this listener with an exceptional response.- Specified by:
onFailurein interfaceActionListener<Response>
-
toString
-