Factory

expect constructor(staticTag: String? = null, observers: Set<TorEvent.Observer> = emptySet(), interceptors: Set<TorCmdInterceptor<*>> = emptySet(), defaultExecutor: OnEvent.Executor = OnEvent.Executor.Immediate, debugger: ItBlock<String>? = null, handler: UncaughtException.Handler)(source)

Parameters

staticTag

Special string that will exclude TorEvent.Observer with the same tag from removal until destroyed

observers

Some initial observers to start with, static or not.

interceptors

Intercepts to hook into executing jobs & modify the TorCmd (if needed).

defaultExecutor

The default OnEvent.Executor to fall back to when calling TorEvent.Observer.notify if it does not have its own.

debugger

A callback for debugging info. MUST be thread safe. Any non-UncaughtException it throws will be swallowed.

handler

The UncaughtException.Handler to pipe bad behavior to. It MUST be thread-safe for Jvm & Native implementations.

actual constructor(staticTag: String?, observers: Set<TorEvent.Observer>, interceptors: Set<TorCmdInterceptor<*>>, defaultExecutor: OnEvent.Executor, debugger: ItBlock<String>?, handler: UncaughtException.Handler)(source)

Parameters

staticTag

Special string that will exclude TorEvent.Observer with the same tag from removal until destroyed.

observers

Some initial observers to start with, static or not.

interceptors

Intercepts to hook into executing jobs & modify the TorCmd (if needed).

defaultExecutor

The default OnEvent.Executor to fall back to when calling TorEvent.Observer.notify if it does not have its own.

debugger

A callback for debugging info. MUST be thread safe. Any non-UncaughtException it throws will be swallowed.

handler

The UncaughtException.Handler to pipe bad behavior to.

@JvmOverloads
actual constructor(staticTag: String?, observers: Set<TorEvent.Observer>, interceptors: Set<TorCmdInterceptor<*>>, defaultExecutor: OnEvent.Executor, debugger: ItBlock<String>?, handler: UncaughtException.Handler)(source)

Parameters

staticTag

Special string that will exclude TorEvent.Observer with the same tag from removal until destroyed

observers

Some initial observers to start with, static or not.

interceptors

Intercepts to hook into executing jobs & modify the TorCmd (if needed).

defaultExecutor

The default OnEvent.Executor to fall back to when calling TorEvent.Observer.notify if it does not have its own.

debugger

A callback for debugging info. MUST be thread safe. Any non-UncaughtException it throws will be swallowed.

handler

The UncaughtException.Handler to pipe bad behavior to. It MUST be thread-safe.