class Recording : AutoCloseable


A recording started with RecorderCommands.start. This interface allows awaits for completion, if a time limit was specified or force stop the recording.

Summary

Public constructors

Recording(
    process: ProcessCommands,
    commandOutput: Shell.CommandOutput,
    timeLimitSeconds: Long,
    pid: Int
)

Public functions

Boolean
await(timeoutSeconds: Long)

Blocks until the recording is complete or up to the timeoutSeconds.

open Unit

Stops the current recording.

Boolean

Returns whether the recording is still running.

Public properties

Int

The process id of the recording.

Public constructors

Recording

Added in 1.0.0-alpha02
Recording(
    process: ProcessCommands,
    commandOutput: Shell.CommandOutput,
    timeLimitSeconds: Long,
    pid: Int
)

Public functions

await

Added in 1.0.0-alpha02
fun await(timeoutSeconds: Long = max(timeLimitSeconds * 2, 10)): Boolean

Blocks until the recording is complete or up to the timeoutSeconds. If a time limit was not given this method throws an IllegalStateException.

Parameters
timeoutSeconds: Long = max(timeLimitSeconds * 2, 10)

the timeout in number of seconds.

Returns
Boolean

whether the recording completed in the given timeoutSeconds.

close

Added in 1.0.0-alpha02
open fun close(): Unit

Stops the current recording.

isRunning

Added in 1.0.0-alpha02
fun isRunning(): Boolean

Returns whether the recording is still running.

Public properties

pid

Added in 1.0.0-alpha02
val pidInt

The process id of the recording.