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 protected
DelegatingActionListener(ActionListener<Delegated> listener)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract Delegated
getDelegatedFromInstigator(Instigator response)
void
onFailure(java.lang.Exception e)
A failure caused by an exception at some phase of the task.void
onResponse(Instigator response)
Handle action response.
-
-
-
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:ActionListener
Handle action response. This response may constitute a failure or a success but it is up to the listener to make that decision.- Specified by:
onResponse
in interfaceActionListener<Instigator extends ActionResponse>
-
onFailure
public final void onFailure(java.lang.Exception e)
Description copied from interface:ActionListener
A failure caused by an exception at some phase of the task.- Specified by:
onFailure
in interfaceActionListener<Instigator extends ActionResponse>
-
-