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 .