Package org.aesh.terminal
Interface Terminal
- All Superinterfaces:
AutoCloseable,Closeable
Terminal interface providing access to terminal functionality.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceHandler for terminal signals. -
Method Summary
Modifier and TypeMethodDescriptiondevice()Get the terminal device for capability queries.booleanecho()Get the current echo state of the terminal.booleanecho(boolean echo) Set the echo state of the terminal.Get the terminal attributes.default Consumer<int[]> Get the code point consumer for this terminal.getName()Get the terminal name.getSize()Get the terminal size.handle(Signal signal, Terminal.SignalHandler handler) Register a signal handler for the specified signal.input()Get the terminal input stream.output()Get the terminal output stream.voidRaise a signal on this terminal.voidsetAttributes(Attributes attr) Set the terminal attributes.
-
Method Details
-
getName
String getName()Get the terminal name.- Returns:
- the terminal name
-
handle
Register a signal handler for the specified signal.- Parameters:
signal- the signal to handlehandler- the handler to register- Returns:
- the previous handler, or null if none
-
raise
Raise a signal on this terminal.- Parameters:
signal- the signal to raise
-
input
InputStream input()Get the terminal input stream.- Returns:
- the input stream
-
output
OutputStream output()Get the terminal output stream.- Returns:
- the output stream
-
echo
boolean echo()Get the current echo state of the terminal.- Returns:
- true if echo is enabled
-
echo
boolean echo(boolean echo) Set the echo state of the terminal.- Parameters:
echo- true to enable echo- Returns:
- the previous echo state
-
getAttributes
Attributes getAttributes()Get the terminal attributes.- Returns:
- the terminal attributes
-
setAttributes
Set the terminal attributes.- Parameters:
attr- the attributes to set
-
getSize
Size getSize()Get the terminal size.- Returns:
- the terminal size
-
device
Device device()Get the terminal device for capability queries.- Returns:
- the terminal device
-
getCodePointConsumer
Get the code point consumer for this terminal.- Returns:
- the code point consumer, or null if none
-