Package org.jline.terminal.impl
Class PosixSysTerminal
java.lang.Object
org.jline.terminal.impl.AbstractTerminal
org.jline.terminal.impl.AbstractPosixTerminal
org.jline.terminal.impl.PosixSysTerminal
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable,TerminalExt,Terminal
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.jline.terminal.Terminal
Terminal.MouseTracking, Terminal.Signal, Terminal.SignalHandler -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final ShutdownHooks.Taskprotected final NonBlockingInputStreamprotected final Map<Terminal.Signal, Object> protected final OutputStreamprotected final NonBlockingReaderprotected final PrintWriterFields inherited from class org.jline.terminal.impl.AbstractPosixTerminal
originalAttributes, ptyFields inherited from class org.jline.terminal.impl.AbstractTerminal
bools, encoding, handlers, ints, name, onClose, palette, status, strings, typeFields inherited from interface org.jline.terminal.Terminal
TYPE_DUMB, TYPE_DUMB_COLOR -
Constructor Summary
ConstructorsConstructorDescriptionPosixSysTerminal(String name, String type, Pty pty, Charset encoding, boolean nativeSignals, Terminal.SignalHandler signalHandler) -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoClose()handle(Terminal.Signal signal, Terminal.SignalHandler handler) Registers a handler for the givenTerminal.Signal.input()Retrieve the input stream for this terminal.output()Retrieve the output stream for this terminal.reader()Retrieve theReaderfor this terminal.writer()Retrieve theWriterfor this terminal.Methods inherited from class org.jline.terminal.impl.AbstractPosixTerminal
getAttributes, getCursorPosition, getProvider, getPty, getSize, getSystemStream, setAttributes, setSize, toStringMethods inherited from class org.jline.terminal.impl.AbstractTerminal
canPauseResume, checkInterrupted, close, echo, echo, echoSignal, encoding, enterRawMode, flush, getBooleanCapability, getKind, getName, getNumericCapability, getPalette, getStatus, getStatus, getStringCapability, getType, hasFocusSupport, hasMouseSupport, parseInfoCmp, pause, pause, paused, puts, raise, readMouseEvent, readMouseEvent, resume, setOnClose, trackFocus, trackMouseMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.jline.terminal.Terminal
getBufferSize, getHeight, getWidth
-
Field Details
-
input
-
output
-
reader
-
writer
-
nativeHandlers
-
closer
-
-
Constructor Details
-
PosixSysTerminal
public PosixSysTerminal(String name, String type, Pty pty, Charset encoding, boolean nativeSignals, Terminal.SignalHandler signalHandler) throws IOException - Throws:
IOException
-
-
Method Details
-
handle
Description copied from interface:TerminalRegisters a handler for the givenTerminal.Signal.Note that the JVM does not easily allow catching the
Terminal.Signal.QUITsignal, which causes a thread dump to be displayed. This signal is mainly used when connecting through an SSH socket to a virtual terminal.- Specified by:
handlein interfaceTerminal- Overrides:
handlein classAbstractTerminal- Parameters:
signal- the signal to register a handler forhandler- the handler- Returns:
- the previous signal handler
-
reader
Description copied from interface:TerminalRetrieve theReaderfor this terminal. This is the standard way to read input from this terminal. The reader is non blocking.- Returns:
- The non blocking reader
-
writer
Description copied from interface:TerminalRetrieve theWriterfor this terminal. This is the standard way to write to this terminal.- Returns:
- The writer
-
input
Description copied from interface:TerminalRetrieve the input stream for this terminal. In some rare cases, there may be a need to access the terminal input stream directly. In the usual cases, use theTerminal.reader()instead.- Returns:
- The input stream
- See Also:
-
output
Description copied from interface:TerminalRetrieve the output stream for this terminal. In some rare cases, there may be a need to access the terminal output stream directly. In the usual cases, use theTerminal.writer()instead.- Returns:
- The output stream
- See Also:
-
doClose
- Overrides:
doClosein classAbstractPosixTerminal- Throws:
IOException
-