FunctionalBindableEventListener

可以进行动态参数绑定的 FunctionalEventListener, 可以通过 binderscaller 进行参数绑定。

invoke 中,如果 caller 是可挂起的(isSuspend = true), 则通过可挂起执行。 如果不是可挂起的,则会通过 runWithInterruptible 在可中断中普通执行。 runWithInterruptible 默认情况下会使用 Dispatchers.IO 作为默认调度器。

Constructors

Functions

Link copied to clipboard
abstract override fun <T : Any> getAttribute(attribute: Attribute<T>): T?
Link copied to clipboard
open suspend operator override fun invoke(context: EventListenerProcessingContext): EventResult

函数执行。

Link copied to clipboard
abstract override fun isTarget(eventType: Event.Key<*>): Boolean
Link copied to clipboard
open suspend override fun match(context: EventListenerProcessingContext): Boolean

Properties

Link copied to clipboard
override val caller: KFunction<R>

当前监听函数所对应的执行器。