TorCmdJob

A wrapper around the jobs returned by TorCmd.Unprivileged.Processor and TorCmd.Privileged.Processor to inform observers that they are being executed.

The job is non-cancellable, created just prior to when the actual TorCmd contents are to be written to the control connection.

This is useful for seeing what is happening and, if needed, attaching invokeOnCompletion handlers for reactionary purposes.

Parameters

cmd

The TorCmd class being executed.

See also

Properties

Link copied to clipboard
@JvmField
val cmd: KClass<out TorCmd<*>>
Link copied to clipboard
Link copied to clipboard
@get:JvmName(name = "isActive")
val isActive: Boolean
Link copied to clipboard
@get:JvmName(name = "isCancelled")
val isCancelled: Boolean
Link copied to clipboard
@get:JvmName(name = "isCompleting")
val isCompleting: Boolean
Link copied to clipboard
@get:JvmName(name = "isError")
val isError: Boolean
Link copied to clipboard
@get:JvmName(name = "isSuccess")
val isSuccess: Boolean
Link copied to clipboard
@JvmField
val name: String
Link copied to clipboard
@get:JvmName(name = "state")
val state: EnqueuedJob.State

Functions

Link copied to clipboard
fun cancel(cause: CancellationException?): Boolean
Link copied to clipboard
protected fun cancellationAttempt(): CancellationException?
Link copied to clipboard
fun invokeOnCompletion(handle: ItBlock<CancellationException?>): Disposable
Link copied to clipboard
protected open fun onCancellation(cause: CancellationException?)
Link copied to clipboard
protected fun <T> onCompletion(response: T, withLock: () -> OnSuccess<T>??): Boolean
Link copied to clipboard
protected fun onError(cause: Throwable, withLock: ItBlock<Throwable>?): Boolean
Link copied to clipboard
protected fun onExecuting()
Link copied to clipboard
override fun toString(): String