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 TypeMethodDescriptionvoidexit(int exitcode) Sets the exit code for the current command execution and stops the execution.Returns the client.Returns theLocaleof the client terminal.This is thePrintWriterwhich writes to the stderr channel of the client terminal.getStdin()Returns anInputStreamwhich represents the stdin of the client terminal.This is thePrintWriterwhich writes to the stdout channel of the client terminal.
-
Method Details
-
getStdout
PrintWriter getStdout()This is thePrintWriterwhich 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 thePrintWriterwhich 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 anInputStreamwhich 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 theLocaleof the client terminal. -
getClient
Client getClient()Returns the client.
-