Package org.elasticsearch.action.support
Class DelegatingActionListener<Instigator extends ActionResponse,Delegated extends ActionResponse>
- java.lang.Object
-
- org.elasticsearch.action.support.DelegatingActionListener<Instigator,Delegated>
-
- All Implemented Interfaces:
ActionListener<Instigator>
public abstract class DelegatingActionListener<Instigator extends ActionResponse,Delegated extends ActionResponse> extends java.lang.Object implements ActionListener<Instigator>
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedDelegatingActionListener(ActionListener<Delegated> listener)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract DelegatedgetDelegatedFromInstigator(Instigator response)voidonFailure(java.lang.Exception e)A failure caused by an exception at some phase of the task.voidonResponse(Instigator response)Handle action response.-
Methods inherited from interface org.elasticsearch.action.ActionListener
-
-
-
-
Constructor Detail
-
DelegatingActionListener
protected DelegatingActionListener(ActionListener<Delegated> listener)
-
-
Method Detail
-
getDelegatedFromInstigator
protected abstract Delegated getDelegatedFromInstigator(Instigator response)
-
onResponse
public final void onResponse(Instigator response)
Description copied from interface:ActionListenerHandle action response. This response may constitute a failure or a success but it is up to the listener to make that decision.- Specified by:
onResponsein interfaceActionListener<Instigator extends ActionResponse>
-
onFailure
public final void onFailure(java.lang.Exception e)
Description copied from interface:ActionListenerA failure caused by an exception at some phase of the task.- Specified by:
onFailurein interfaceActionListener<Instigator extends ActionResponse>
-
-