Class JLineShellRunner

java.lang.Object
org.springframework.shell.core.InteractiveShellRunner
org.springframework.shell.jline.JLineShellRunner
All Implemented Interfaces:
org.springframework.beans.factory.DisposableBean, org.springframework.shell.core.ShellRunner

public class JLineShellRunner extends org.springframework.shell.core.InteractiveShellRunner
Interactive shell runner based on the JVM's system Console.
Since:
4.0.0
Author:
Mahmoud Ben Hassine, David Pilar
  • Constructor Details

    • JLineShellRunner

      public JLineShellRunner(JLineInputProvider inputProvider, org.springframework.shell.core.command.CommandParser commandParser, org.springframework.shell.core.command.CommandRegistry commandRegistry)
      Create a new JLineShellRunner instance.
      Parameters:
      inputProvider - the JLine input provider
      commandParser - the command parser
      commandRegistry - the command registry
  • Method Details

    • print

      public void print(String message)
      Specified by:
      print in class org.springframework.shell.core.InteractiveShellRunner
    • flush

      public void flush()
      Specified by:
      flush in class org.springframework.shell.core.InteractiveShellRunner
    • getWriter

      public PrintWriter getWriter()
      Specified by:
      getWriter in class org.springframework.shell.core.InteractiveShellRunner
    • getReader

      public org.springframework.shell.core.InputReader getReader()
      Specified by:
      getReader in class org.springframework.shell.core.InteractiveShellRunner
    • wakeup

      protected void wakeup()
      Raise INT on the terminal so the blocked LineReader.readLine() throws.
      Overrides:
      wakeup in class org.springframework.shell.core.InteractiveShellRunner