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.

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    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.
  • Constructor Summary

    Constructors
    Constructor
    Description
    InteractiveShellRunner(org.jline.reader.LineReader lineReader, PromptProvider promptProvider, Shell shell, ShellContext shellContext)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    canRun(org.springframework.boot.ApplicationArguments args)
    Checks if a particular shell runner can execute.
    void
    run(org.springframework.boot.ApplicationArguments args)
    Execute application.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 void run(org.springframework.boot.ApplicationArguments args) throws Exception
      Description copied from interface: ShellRunner
      Execute application.
      Specified by:
      run in interface ShellRunner
      Parameters:
      args - the application argumets
      Throws:
      Exception - in errors
    • canRun

      public boolean canRun(org.springframework.boot.ApplicationArguments args)
      Description copied from interface: ShellRunner
      Checks if a particular shell runner can execute.
      Specified by:
      canRun in interface ShellRunner
      Parameters:
      args - the application arguments
      Returns:
      true if shell runner can execute