public final class LoggingTaskListener<Response> extends java.lang.Object implements TaskListener<Response>
Modifier and Type | Method and Description |
---|---|
static <Response> TaskListener<Response> |
instance()
Get the instance of NoopActionListener cast appropriately.
|
void |
onFailure(Task task,
java.lang.Throwable e)
A failure caused by an exception at some phase of the task.
|
void |
onResponse(Task task,
Response response)
Handle task response.
|
public static <Response> TaskListener<Response> instance()
public void onResponse(Task task, Response response)
TaskListener
onResponse
in interface TaskListener<Response>
task
- the task being executed. May be null if the action doesn't
create a taskresponse
- the response from the action that executed the taskpublic void onFailure(Task task, java.lang.Throwable e)
TaskListener
onFailure
in interface TaskListener<Response>
task
- the task being executed. May be null if the action doesn't
create a taske
- the failure