Observer

open class Observer(event: TorEvent, tag: String?, executor: OnEvent.Executor?, onEvent: OnEvent<String>) : Event.Observer<String, TorEvent>

Model to be registered with a Processor for being notified via OnEvent invocation with TorEvent data.

See also

Constructors

Link copied to clipboard
constructor(event: TorEvent, tag: String?, executor: OnEvent.Executor?, onEvent: OnEvent<String>)

Properties

Link copied to clipboard
Link copied to clipboard

A string value for grouping or identifying the observer.

Functions

Link copied to clipboard
fun notify(default: OnEvent.Executor, data: String)

Invokes OnEvent with the provided data

fun notify(handler: CoroutineContext, default: OnEvent.Executor, data: String)

Invokes OnEvent with the provided data

Link copied to clipboard
fun toString(isStatic: Boolean): String

Helper for processor implementations as to not expose a static tag externally.