Interface CLIContext

All Known Implementing Classes:
SystemCLIContext

public interface CLIContext
  • Method Details

    • getCommandNameOrAliasUsed

      @Nullable String getCommandNameOrAliasUsed()
      Command name or alias used to invoke the command, or null if this was invoked using the fully qualified class name.
    • getArguments

      String[] getArguments()
      Obtain the command line arguments for the command.
    • getEnvironment

      Map<String,String> getEnvironment()
      Obtain the environment variables for the command.
    • getConsole

      @Nullable Console getConsole()
      Obtain the console, if available.
    • getInputStream

      InputStream getInputStream()
    • getOutputStream

      PrintStream getOutputStream()
    • getErrorStream

      PrintStream getErrorStream()
    • getExitStatus

      int getExitStatus()
    • getExitCause

      @Nullable Exception getExitCause()
      Obtain the exit cause, if known.
    • setExitStatus

      void setExitStatus(int exitStatus, @Nullable Exception exitCause)