public interface WorkerListener
WorkerEvent| 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 occurence of a registered
WorkerEvent.
|
void onEvent(WorkerEvent event, Worker worker, String queue, Job job, Object runner, Object result, Throwable t)
event - 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.