toListener
fun <E : Event> toListener(dispatcherContext: CoroutineContext = Dispatchers.IO, type: Class<E>, listener: TypedJBlockEventListener<E>): EventListener(source)
Converts a TypedJBlockEventListener to an EventListener.
Return
The converted EventListener.
Parameters
dispatcherContext
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.