Java Event Emitter
Provides EventEmitter functionality that is more convenient for Java usage.
Functions
Link copied to clipboard
abstract fun <E : T> next(eventClass: Class<E>, eventListener: EventListener<E>)
Content copied to clipboard
Subscribes the eventListener to be executed when the next event of type E is emitted. The eventListener will then be automatically unsubscribed.
Link copied to clipboard
Unsubscribes the eventListener for all events.
abstract fun <E : T> off(eventClass: Class<E>, eventListener: EventListener<E>)
Content copied to clipboard
Unsubscribes the eventListener for the specified event.
Link copied to clipboard
abstract fun <E : T> on(eventClass: Class<E>, eventListener: EventListener<E>)
Content copied to clipboard
Subscribes the eventListener to be executed when an event of type E is emitted. Provides the same functionality as EventEmitter.on with a more convenient style when used from Java.