public final class Recording implements 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(
    @NonNull ProcessCommands process,
    @NonNull Shell.CommandOutput commandOutput,
    long timeLimitSeconds,
    int pid
)

Public methods

final boolean
await(long timeoutSeconds)

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

void

Stops the current recording.

final int

The process id of the recording.

final boolean

Returns whether the recording is still running.

Public constructors

Recording

Added in 1.0.0-alpha02
public Recording(
    @NonNull ProcessCommands process,
    @NonNull Shell.CommandOutput commandOutput,
    long timeLimitSeconds,
    int pid
)

Public methods

await

Added in 1.0.0-alpha02
public final boolean await(long timeoutSeconds)

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

Parameters
long timeoutSeconds

the timeout in number of seconds.

Returns
boolean

whether the recording completed in the given timeoutSeconds.

close

Added in 1.0.0-alpha02
public void close()

Stops the current recording.

getPid

Added in 1.0.0-alpha02
public final int getPid()

The process id of the recording.

isRunning

Added in 1.0.0-alpha02
public final boolean isRunning()

Returns whether the recording is still running.