next

abstract fun <E : T> next(eventClass: Class<E>, eventListener: EventListener<in E>)

Subscribes the eventListener to be executed when the next event of type E is emitted. The eventListener will then be automatically unsubscribed.