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