Package org.springframework.shell.core
Class InteractiveShellRunner
java.lang.Object
org.springframework.shell.core.InteractiveShellRunner
- All Implemented Interfaces:
ShellRunner
- Direct Known Subclasses:
JLineShellRunner,SystemShellRunner
Base class for interactive shell runners. Implementations must provide concrete methods
to print messages and flush the output.
- Since:
- 4.0.0
- Author:
- Mahmoud Ben Hassine
-
Constructor Summary
ConstructorsConstructorDescriptionInteractiveShellRunner(InputProvider inputProvider, CommandParser commandParser, CommandRegistry commandRegistry) Create a newInteractiveShellRunnerinstance. -
Method Summary
-
Constructor Details
-
InteractiveShellRunner
public InteractiveShellRunner(InputProvider inputProvider, CommandParser commandParser, CommandRegistry commandRegistry) Create a newInteractiveShellRunnerinstance.- Parameters:
inputProvider- the input providercommandParser- the command parsercommandRegistry- the command registry
-
-
Method Details
-
run
Description copied from interface:ShellRunnerExecuteShellRunnerwith given args.- Specified by:
runin interfaceShellRunner- Parameters:
args- the raw arguments- Throws:
Exception- possible error during run
-
print
Print a message to the output.- Parameters:
message- the message to print
-
flush
public abstract void flush()Flush the output. -
getWriter
Get the writer to the output.- Returns:
- the print writer
-