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
ConstructorsConstructorDescriptionTerminalStarter(Terminal terminal, TtyConnector ttyConnector, TerminalDataStream dataStream) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()protected JediEmulatorcreateEmulator(TerminalDataStream dataStream, Terminal terminal) voidpostResize(int width, int height, RequestOrigin origin) static voidresize(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.voidsendBytes(byte[] bytes) voidsendBytes(byte[] bytes, boolean userInput) voidsendString(String string) voidsendString(String string, boolean userInput) voidstart()
-
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:
sendBytesin interfaceTerminalOutputStream
-
sendBytes
public void sendBytes(byte[] bytes, boolean userInput) - Specified by:
sendBytesin interfaceTerminalOutputStream
-
sendString
- Specified by:
sendStringin interfaceTerminalOutputStream
-
sendString
- Specified by:
sendStringin interfaceTerminalOutputStream
-
close
public void close()
-