SimpleListenerHost

abstract class SimpleListenerHost constructor(coroutineContext: CoroutineContext) : ListenerHost, CoroutineScope

携带一个异常处理器的 ListenerHost.

See also

Constructors

SimpleListenerHost
Link copied to clipboard
fun SimpleListenerHost(coroutineContext: CoroutineContext = EmptyCoroutineContext)

Functions

cancelAll
Link copied to clipboard
fun cancelAll()

停止所有事件监听

handleException
Link copied to clipboard
open fun handleException(context: CoroutineContext, exception: Throwable)

处理事件处理中未捕获的异常. 在构造器中的 coroutineContext 未提供 CoroutineExceptionHandler 情况下必须继承此函数.

Properties

coroutineContext
Link copied to clipboard
override val coroutineContext: CoroutineContext