PtyConnector

TerminalConnector backed by a local PTY process.

This connector owns PTY reader and watcher threads. It only moves bytes and lifecycle events between the PTY process and a connector listener; parser, core, cursor, attribute, and input-encoder behavior are owned by terminal-session and lower layers.

Parameters

process

the underlying PTY process.

readBufferSize

size of the read buffer in bytes.

readerThreadName

name for the daemon PTY stdout reader thread.

watcherThreadName

name for the daemon process exit watcher thread.

Constructors

Link copied to clipboard
constructor(process: PtyProcess, readBufferSize: Int = DEFAULT_READ_BUFFER_SIZE, readerThreadName: String = DEFAULT_READER_THREAD_NAME, watcherThreadName: String = DEFAULT_WATCHER_THREAD_NAME)

Creates a connector for a raw PTY4J process.

Properties

Link copied to clipboard

Process exit code after the watcher observes process termination.

Link copied to clipboard

Captured transport read failure, or null when no reader failure occurred.

Link copied to clipboard

Returns true while the underlying PTY process reports it is alive.

Functions

Link copied to clipboard
open override fun close()
Link copied to clipboard
open override fun resize(columns: Int, rows: Int)
Link copied to clipboard
open override fun start(listener: TerminalConnectorListener)
Link copied to clipboard
fun waitFor(): Int

Waits for the child process to exit and returns its exit code.

Link copied to clipboard
open override fun write(bytes: ByteArray, offset: Int, length: Int)