Package org.aesh.terminal.tty.impl
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
Abstract base class for POSIX-compliant terminal implementations using PTY.
- Author:
- Stale W. Pedersen
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.aesh.terminal.Terminal
Terminal.SignalHandler -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final AttributesThe original terminal attributes saved for restoration on close.protected final PtyThe pseudo-terminal device for this terminal. -
Constructor Summary
ConstructorsConstructorDescriptionAbstractPosixTerminal(String name, String type, Pty pty) Creates a new POSIX terminal with the specified name, type, and PTY. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()protected PtygetPty()Returns the pseudo-terminal device associated with this terminal.getSize()voidsetAttributes(Attributes attr) Methods inherited from class org.aesh.terminal.tty.impl.AbstractTerminal
device, echo, echo, echoSignal, getName, getType, handle, handleDefaultSignal, raiseMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.aesh.terminal.Terminal
getCodePointConsumer, input, output
-
Field Details
-
pty
The pseudo-terminal device for this terminal. -
originalAttributes
The original terminal attributes saved for restoration on close.
-
-
Constructor Details
-
AbstractPosixTerminal
Creates a new POSIX terminal with the specified name, type, and PTY.- Parameters:
name- the terminal nametype- 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
Returns the pseudo-terminal device associated with this terminal.- Returns:
- the PTY device
-
getAttributes
-
setAttributes
-
getSize
-
close
- Throws:
IOException
-