Class PosixSysTerminal
java.lang.Object
org.aesh.terminal.tty.impl.AbstractTerminal
org.aesh.terminal.tty.impl.AbstractPosixTerminal
org.aesh.terminal.tty.impl.PosixSysTerminal
- All Implemented Interfaces:
Closeable, AutoCloseable, Terminal
A POSIX system terminal implementation that provides native signal handling
and integrates with the system's PTY.
-
Nested Class Summary
Nested classes/interfaces inherited from interface Terminal
Terminal.SignalHandler -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final ShutdownHooks.TaskShutdown hook task for cleanup.protected final InputStreamThe terminal input stream.Map of signals to their native handlers.protected final OutputStreamThe terminal output stream.Fields inherited from class AbstractPosixTerminal
originalAttributes, pty -
Constructor Summary
ConstructorsConstructorDescriptionPosixSysTerminal(String name, String type, Pty pty, boolean nativeSignals) Constructs a PosixSysTerminal with the specified parameters. -
Method Summary
Methods inherited from class AbstractPosixTerminal
getAttributes, getPty, getSize, setAttributesMethods inherited from class AbstractTerminal
device, echo, echo, echoSignal, getName, getType, handle, handleDefaultSignal, raiseMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Terminal
getCodePointConsumer
-
Field Details
-
input
The terminal input stream. -
output
The terminal output stream. -
nativeHandlers
-
closer
Shutdown hook task for cleanup.
-
-
Constructor Details
-
PosixSysTerminal
public PosixSysTerminal(String name, String type, Pty pty, boolean nativeSignals) throws IOException Constructs a PosixSysTerminal with the specified parameters.- Parameters:
name- the terminal nametype- the terminal typepty- the pseudo-terminal to usenativeSignals- whether to enable native signal handling- Throws:
IOException- if an I/O error occurs during initialization
-
-
Method Details
-
input
-
output
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classAbstractPosixTerminal- Throws:
IOException
-