Class AbstractPosixTerminal

java.lang.Object
org.aesh.terminal.tty.impl.AbstractTerminal
org.aesh.terminal.tty.impl.AbstractPosixTerminal
All Implemented Interfaces:
Closeable, AutoCloseable, Terminal
Direct Known Subclasses:
PosixSysTerminal

public abstract class AbstractPosixTerminal extends AbstractTerminal
Abstract base class for POSIX-compliant terminal implementations using PTY.
Author:
Stale W. Pedersen
  • Field Details

    • pty

      protected final Pty pty
      The pseudo-terminal device for this terminal.
    • originalAttributes

      protected final Attributes originalAttributes
      The original terminal attributes saved for restoration on close.
  • Constructor Details

    • AbstractPosixTerminal

      public AbstractPosixTerminal(String name, String type, Pty pty) throws IOException
      Creates a new POSIX terminal with the specified name, type, and PTY.
      Parameters:
      name - the terminal name
      type - the terminal type (e.g., "xterm", "vt100")
      pty - the pseudo-terminal device
      Throws:
      IOException - if an I/O error occurs during initialization
  • Method Details

    • getPty

      protected Pty getPty()
      Returns the pseudo-terminal device associated with this terminal.
      Returns:
      the PTY device
    • getAttributes

      public Attributes getAttributes()
    • setAttributes

      public void setAttributes(Attributes attr)
    • getSize

      public Size getSize()
    • close

      public void close() throws IOException
      Throws:
      IOException