org.springframework.shell.core
Class JLineShellComponent
java.lang.Object
org.springframework.shell.event.AbstractShellStatusPublisher
org.springframework.shell.core.AbstractShell
org.springframework.shell.core.JLineShell
org.springframework.shell.core.JLineShellComponent
- All Implemented Interfaces:
- Runnable, Aware, InitializingBean, ApplicationContextAware, Lifecycle, Phased, SmartLifecycle, Shell, ShellPromptAccessor, ShellStatusProvider
public class JLineShellComponent
- extends JLineShell
- implements SmartLifecycle, ApplicationContextAware, InitializingBean
Launcher for JLineShell.
- Since:
- 1.1
| Methods inherited from class org.springframework.shell.core.JLineShell |
closeShell, createAnsiWindowsReader, createConsoleReader, flash, getHistorySize, getHomeAsString, isDevelopmentMode, logCommandToOutput, promptLoop, run, setDevelopmentMode, setHistorySize, setPromptPath, setPromptPath |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JLineShellComponent
public JLineShellComponent()
getSimpleParser
public SimpleParser getSimpleParser()
isAutoStartup
public boolean isAutoStartup()
- Specified by:
isAutoStartup in interface SmartLifecycle
stop
public void stop(Runnable callback)
- Specified by:
stop in interface SmartLifecycle
getPhase
public int getPhase()
- Specified by:
getPhase in interface Phased
start
public void start()
- Specified by:
start in interface Lifecycle
stop
public void stop()
- Specified by:
stop in interface Lifecycle
isRunning
public boolean isRunning()
- Specified by:
isRunning in interface Lifecycle
afterPropertiesSet
public void afterPropertiesSet()
- Specified by:
afterPropertiesSet in interface InitializingBean
waitForComplete
public void waitForComplete()
- wait the shell command to complete by typing "quit" or "exit"
getExecutionStrategy
protected ExecutionStrategy getExecutionStrategy()
- Specified by:
getExecutionStrategy in class AbstractShell
getParser
protected Parser getParser()
- Specified by:
getParser in class AbstractShell
getStartupNotifications
public String getStartupNotifications()
- Overrides:
getStartupNotifications in class JLineShell
setApplicationContext
public void setApplicationContext(ApplicationContext applicationContext)
throws BeansException
- Specified by:
setApplicationContext in interface ApplicationContextAware
- Throws:
BeansException
customizePlugin
public void customizePlugin()
getHistoryFileName
protected String getHistoryFileName()
- get history file name from provider. The provider has highest order
org.springframework.core.Ordered.getOder will win.
- Specified by:
getHistoryFileName in class JLineShell
- Returns:
- history file name
getPromptText
protected String getPromptText()
- get prompt text from provider. The provider has highest order
org.springframework.core.Ordered.getOder will win.
- Specified by:
getPromptText in class JLineShell
- Returns:
- prompt text
printBannerAndWelcome
public void printBannerAndWelcome()
- Overrides:
printBannerAndWelcome in class JLineShell
getWelcomeMessage
public String getWelcomeMessage()
- get the welcome message at start.
- Returns:
- welcome message
setPrintBanner
public void setPrintBanner(boolean printBanner)
- Parameters:
printBanner - the printBanner to set
getProductName
protected String getProductName()
- Description copied from class:
JLineShell
- get product name
- Specified by:
getProductName in class JLineShell
- Returns:
- Product Name
getVersion
protected String getVersion()
- Description copied from class:
JLineShell
- get version information
- Overrides:
getVersion in class JLineShell
- Returns:
- Version