Class AbstractPosixTerminal

java.lang.Object
org.jline.terminal.impl.AbstractTerminal
org.jline.terminal.impl.AbstractPosixTerminal
All Implemented Interfaces:
Closeable, Flushable, AutoCloseable, TerminalExt, Terminal
Direct Known Subclasses:
PosixPtyTerminal, PosixSysTerminal

public abstract class AbstractPosixTerminal extends AbstractTerminal
Base implementation for terminals on POSIX-compliant systems.

The AbstractPosixTerminal class provides a foundation for terminal implementations on POSIX-compliant systems such as Linux, macOS, and other Unix-like operating systems. It builds on the AbstractTerminal class and adds POSIX-specific functionality, particularly related to pseudoterminal (PTY) handling.

This class manages the interaction with the underlying PTY, handling terminal attributes, size changes, and other POSIX-specific terminal operations. It provides implementations for many of the abstract methods defined in AbstractTerminal, leaving only a few methods to be implemented by concrete subclasses.

Key features provided by this class include:

  • PTY management and interaction
  • Terminal attribute preservation and restoration
  • Size handling and window change signals
  • Cursor position detection

This class is designed to be extended by concrete implementations that target specific POSIX platforms or environments.

See Also: