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 Summary
Modifier and TypeMethodDescriptionvoid
exit
(int exitcode) Sets the exit code for the current command execution and stops the execution.Returns the client.Returns theLocale
of the client terminal.This is thePrintWriter
which writes to the stderr channel of the client terminal.getStdin()
Returns anInputStream
which represents the stdin of the client terminal.This is thePrintWriter
which writes to the stdout channel of the client terminal.
-
Method Details
-
getStdout
PrintWriter getStdout()This is thePrintWriter
which writes to the stdout channel of the client terminal. Use this channel for "normal" messages, for errors usegetStderr()
.- Returns:
- writer for stdout
-
getStderr
PrintWriter getStderr()This is thePrintWriter
which writes to the stderr channel of the client terminal. Use this channel for error messages, for "normal" messages usegetStdout()
.- Returns:
- writer for stderr
-
getStdin
InputStream getStdin()Returns anInputStream
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 theLocale
of the client terminal. -
getClient
Client getClient()Returns the client.
-