FunctionalBindableEventListener
abstract class FunctionalBindableEventListener<R>(matcher: suspend (EventListenerProcessingContext) -> Boolean, val caller: KFunction<R>) : FunctionalEventListener<R> , GenericBootEventListener
可以进行动态参数绑定的 FunctionalEventListener, 可以通过 binders 对 caller 进行参数绑定。
在 invoke 中,如果 caller 是可挂起的(isSuspend = true
), 则通过可挂起执行。 如果不是可挂起的,则会通过 runWithInterruptible 在可中断中普通执行。 runWithInterruptible 默认情况下会使用 Dispatchers.IO 作为默认调度器。
Constructors
Link copied to clipboard
fun <R> FunctionalBindableEventListener(matcher: suspend (EventListenerProcessingContext) -> Boolean, caller: KFunction<R>)