next

abstract fun <E : T> next(eventClass: KClass<E>, action: (E) -> Unit)

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

open override fun <E : T> next(eventClass: Class<E>, eventListener: EventListener<E>)

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