Package sonia.scm.cli

Interface CliContext


public interface CliContext
Context for the CLI client which is used by the CLI commands
Since:
2.33.0
  • Method Details

    • getStdout

      PrintWriter getStdout()
      This is the PrintWriter which writes to the stdout channel of the client terminal. Use this channel for "normal" messages, for errors use getStderr().
      Returns:
      writer for stdout
    • getStderr

      PrintWriter getStderr()
      This is the PrintWriter which writes to the stderr channel of the client terminal. Use this channel for error messages, for "normal" messages use getStdout().
      Returns:
      writer for stderr
    • getStdin

      InputStream getStdin()
      Returns an InputStream which represents the stdin of the client terminal.
      Returns:
      the stdin channel of the client terminal
    • exit

      void exit(int exitcode)
      Sets the exit code for the current command execution and stops the execution.
      Parameters:
      exitcode - exit code which will be return to the client terminal
    • getLocale

      Locale getLocale()
      Returns the Locale of the client terminal.
    • getClient

      Client getClient()
      Returns the client.