to Listener
fun <E : Event> toListener(dispatcherContext: CoroutineContext = Dispatchers.IO, type: Class<E>, listener: TypedJBlockEventListener<E>): EventListener
Converts a TypedJBlockEventListener to an EventListener.
Return
The converted EventListener.
Parameters
dispatcher Context
The coroutine context to be used for dispatching events. Default value is Dispatchers.IO. Will be used in runInterruptible.
listener
The TypedJBlockEventListener to be converted.