FunctionalBindableEventListener
abstract class FunctionalBindableEventListener(instance: Any?, val caller: KFunction<*>, dispatcherContext: CoroutineContext = Dispatchers.IO) : FunctionalEventListener(source)
可以进行动态参数绑定的 FunctionalEventListener, 可以通过 binders 对 caller 进行参数绑定。
在 invoke 中,如果 caller 是可挂起的(isSuspend = true
), 则通过可挂起执行。 如果不是可挂起的,则会通过 runInterruptible 在可中断中普通执行。 runInterruptible 会使用 dispatcherContext 作为调度器。
Constructors
Link copied to clipboard
constructor(instance: Any?, caller: KFunction<*>, dispatcherContext: CoroutineContext = Dispatchers.IO)