Interface TerminalSession

All Superinterfaces:
AutoCloseable

public interface TerminalSession extends AutoCloseable
A terminal with some back-end element attached to it
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
     
    default String
    Get the terminal contents as a string (no attributes)
    Provide a human-readable description of the session
    default boolean
    Check whether the terminal session is terminated or still active
    default void
    Ensure the session is visible
    The handle to the terminal
    void
    Terminate the session without closing the terminal
    default String
    Get the current title of the terminal
  • Method Details

    • close

      default void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Throws:
      IOException
    • terminal

      Terminal terminal()
      The handle to the terminal
      Returns:
      the handle
    • show

      default void show()
      Ensure the session is visible

      The window should be displayed and brought to the front.

    • terminate

      void terminate() throws IOException
      Terminate the session without closing the terminal
      Throws:
      IOException - if an I/O issue occurs during termination
    • isTerminated

      default boolean isTerminated()
      Check whether the terminal session is terminated or still active
      Returns:
      true for terminated, false for active
    • description

      String description()
      Provide a human-readable description of the session
      Returns:
      the description
    • content

      default String content()
      Get the terminal contents as a string (no attributes)
      Returns:
      the content
    • title

      default String title()
      Get the current title of the terminal
      Returns:
      the title