public class LoggingWorkerListener extends Object implements WorkerListener
| Modifier and Type | Field and Description |
|---|---|
static LoggingWorkerListener |
INSTANCE |
| Modifier and Type | Method and Description |
|---|---|
void |
onEvent(WorkerEvent event,
Worker worker,
String queue,
Job job,
Object runner,
Object result,
Throwable t)
If there is a Throwable, it is logged as an error, otherwise it is
logged as a debug message.
|
public static final LoggingWorkerListener INSTANCE
public void onEvent(WorkerEvent event, Worker worker, String queue, Job job, Object runner, Object result, Throwable t)
onEvent in interface WorkerListenerevent - the WorkerEvent that occuredworker - the Worker that the event occured inqueue - the queue the Worker is processingjob - the Job related to the event (only set for JOB_PROCESS,
JOB_EXECUTE, JOB_SUCCESS, and JOB_FAILURE events)runner - the materialized object that the Job specified (only set for
JOB_EXECUTE and JOB_SUCCESS events)result - the result of the successful execution of the Job (only set
for JOB_SUCCESS and if the Job was a Callable that returned a
value)t - the Throwable that caused the event (only set for JOB_FAILURE
and ERROR events)Copyright © 2011-2015. All Rights Reserved.