Interface TerminalSink
- All Known Implementing Classes:
TerminalProcess
public interface TerminalSink
Where a caller's keystrokes go: the input end of one running terminal job.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanWhether input is accepted right now.booleanwrite(byte[] bytes) Hands the bytes to the process.
-
Method Details
-
acceptsInput
boolean acceptsInput()Whether input is accepted right now.- Returns:
false once the process has ended or a write has failed.
-
write
Hands the bytes to the process.Must not block the caller (it runs on the WebSocket thread). Never throws for a closed or broken pipe: that turns
acceptsInput()false instead.- Parameters:
bytes- The bytes to send.- Returns:
false when the bytes were not taken because the sink's pending-input buffer is full.- Throws:
IOException- On an unexpected I/O failure.
-