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.