Package org.elasticsearch.tasks
Class LoggingTaskListener<Response>
java.lang.Object
org.elasticsearch.tasks.LoggingTaskListener<Response>
- All Implemented Interfaces:
TaskListener<Response>
A TaskListener that just logs the response at the info level. Used when we
need a listener but aren't returning the result to the user.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <Response> TaskListener<Response>instance()Get the instance of NoopActionListener cast appropriately.voidA failure caused by an exception at some phase of the task.voidonResponse(Task task, Response response)Handle task response.
-
Method Details
-
instance
Get the instance of NoopActionListener cast appropriately. -
onResponse
Description copied from interface:TaskListenerHandle task response. This response may constitute a failure or a success but it is up to the listener to make that decision.- Specified by:
onResponsein interfaceTaskListener<Response>- 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
Description copied from interface:TaskListenerA failure caused by an exception at some phase of the task.- Specified by:
onFailurein interfaceTaskListener<Response>- Parameters:
task- the task being executed. May be null if the action doesn't create a taske- the failure
-