Class TerminalStarter
java.lang.Object
org.springframework.shell.test.jediterm.terminal.TerminalStarter
- All Implemented Interfaces:
TerminalOutputStream
Runs terminal emulator. Manages threads to send response.
-
Constructor Summary
ConstructorDescriptionTerminalStarter
(Terminal terminal, TtyConnector ttyConnector, TerminalDataStream dataStream) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
protected JediEmulator
createEmulator
(TerminalDataStream dataStream, Terminal terminal) void
postResize
(int width, int height, RequestOrigin origin) static void
resize
(Emulator emulator, Terminal terminal, TtyConnector ttyConnector, int width, int height, RequestOrigin origin, BiConsumer<Long, Runnable> taskScheduler) Resizes terminal and tty connector, should be called on a pooled thread.void
sendBytes
(byte[] bytes) void
sendBytes
(byte[] bytes, boolean userInput) void
sendString
(String string) void
sendString
(String string, boolean userInput) void
start()
-
Constructor Details
-
TerminalStarter
-
-
Method Details
-
createEmulator
-
start
public void start() -
postResize
-
resize
public static void resize(Emulator emulator, Terminal terminal, TtyConnector ttyConnector, int width, int height, RequestOrigin origin, BiConsumer<Long, Runnable> taskScheduler) Resizes terminal and tty connector, should be called on a pooled thread. -
sendBytes
public void sendBytes(byte[] bytes) - Specified by:
sendBytes
in interfaceTerminalOutputStream
-
sendBytes
public void sendBytes(byte[] bytes, boolean userInput) - Specified by:
sendBytes
in interfaceTerminalOutputStream
-
sendString
- Specified by:
sendString
in interfaceTerminalOutputStream
-
sendString
- Specified by:
sendString
in interfaceTerminalOutputStream
-
close
public void close()
-