public Future emit ( String event , T ... args ) { ConcurrentLinkedQueue < Listener > callbacks = this . callbacks . get ( event ) ; if ( callbacks != null ) { callbacks = new ConcurrentLinkedQueue < Listener > ( callbacks ) ; for ( Listener fn : callbacks ) { fn . call ( args ) ; } } return null ; }
Executes each of listeners with the given args .