public void fireEvent(final WorkerEvent event, final Worker worker, final String queue, final Job job, 
            final Object runner, final Object result, final Throwable t) {
        final ConcurrentSet<WorkerListener> listeners = this.eventListenerMap.get(event);
        if (listeners != null) {
            for (final WorkerListener listener : listeners) {
                if (listener != null) {
                    try {
                        listener.onEvent(event, worker, queue, job, runner, result, t);
                    } catch (Exception e) {
                        log.error("Failure executing listener " + listener + " for event " + event 
                                + " from queue " + queue + " on worker " + worker, e);
                    }
                }
            }
        }
    }
public void fireEvent ( final WorkerEvent event , final Worker worker , final String queue , final Job job , final Object runner , final Object result , final Throwable t ) { final ConcurrentSet < WorkerListener > listeners = this . eventListenerMap . get ( event ) ; if ( listeners != null ) { for ( final WorkerListener listener : listeners ) { if ( listener != null ) { try { listener . onEvent ( event , worker , queue , job , runner , result , t ) ; } catch ( Exception e ) { log . error ( "Failure executing listener " + listener + " for event " + event + " from queue " + queue + " on worker " + worker , e ) ; } } } } }
Notify all WorkerListeners currently registered for the given WorkerEvent.
@param event the WorkerEvent that occurred
@param worker the Worker that the event occurred in
@param queue the queue the Worker is processing
@param job the Job related to the event (only supply for JOB_PROCESS, JOB_EXECUTE, JOB_SUCCESS, and
JOB_FAILURE events)
@param runner the materialized object that the Job specified (only supply for JOB_EXECUTE and
JOB_SUCCESS events)
@param 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)
@param t the Throwable that caused the event (only supply for JOB_FAILURE and ERROR events)