Class InteractiveShellRunner

java.lang.Object
org.springframework.shell.jline.InteractiveShellRunner
All Implemented Interfaces:
ShellRunner

@Order(0) public class InteractiveShellRunner extends Object implements ShellRunner
A ShellRunner that bootstraps the shell in interactive mode.

Has lower precedence than ScriptShellRunner and NonInteractiveShellRunner which makes it the default shell runner when the other runners opt-out of handling the shell.

  • Field Details

    • PRECEDENCE

      public static final int PRECEDENCE
      The precedence at which this runner is ordered by the DefaultApplicationRunner - which also controls the order it is consulted on the ability to handle the current shell.
      See Also:
  • Constructor Details

    • InteractiveShellRunner

      public InteractiveShellRunner(org.jline.reader.LineReader lineReader, PromptProvider promptProvider, Shell shell, ShellContext shellContext)
  • Method Details

    • run

      public boolean run(String[] args) throws Exception
      Description copied from interface: ShellRunner
      Execute ShellRunner with given args. Return value indicates if run operation happened and no further runners should be used.
      Specified by:
      run in interface ShellRunner
      Parameters:
      args - the raw arguments
      Returns:
      true if run execution happened
      Throws:
      Exception - possible error during run