public void publish ( TaskEvent event ) { synchronized ( listeners ) { for ( EventListener < TaskEvent > listener : listeners . get ( event . getClass ( ) ) ) { listener . onEvent ( event ) ; } } }
Publishes the task event to all subscribed event listeners .