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 Type
    Method
    Description
    boolean
    Whether input is accepted right now.
    boolean
    write(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

      boolean write(byte[] bytes) throws IOException
      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.