Package org.elasticsearch.tasks
Interface TaskListener<Response>
-
- All Known Implementing Classes:
LoggingTaskListener
public interface TaskListener<Response>Listener for Task success or failure.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidonFailure(Task task, java.lang.Throwable e)A failure caused by an exception at some phase of the task.voidonResponse(Task task, Response response)Handle task response.
-
-
-
Method Detail
-
onResponse
void onResponse(Task task, Response response)
Handle task response. This response may constitute a failure or a success but it is up to the listener to make that decision.- Parameters:
task- the task being executed. May be null if the action doesn't create a taskresponse- the response from the action that executed the task
-
onFailure
void onFailure(Task task, java.lang.Throwable e)
A failure caused by an exception at some phase of the task.- Parameters:
task- the task being executed. May be null if the action doesn't create a taske- the failure
-
-