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)
This method is called by the Worker upon the occurrence of a registered WorkerEvent.
|
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 occurredworker - the Worker that the event occurred 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–2019. All rights reserved.