Package org.aesh.terminal.tty.impl
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 org.aesh.terminal.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 org.aesh.terminal.tty.impl.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 org.aesh.terminal.tty.impl.AbstractPosixTerminal
getAttributes, getPty, getSize, setAttributesMethods 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
-
Field Details
-
input
The terminal input stream. -
output
The terminal output stream. -
nativeHandlers
Map of signals to their native handlers. -
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
-