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, Lifecycle, CommandMarker, Shell, ShellPromptAccessor, ShellStatusProvider
public class JLineShellComponent
- extends JLineShell
- implements Lifecycle
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 org.springframework.shell.core.AbstractShell |
blockCommentBegin, blockCommentFinish, date, executeCommand, executeScriptLine, flashCustom, getExitShellRequest, getHome, getShellPrompt, handleExecutionResult, inlineComment, logCommandIfRequired, props, script, version, versionInfo |
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()
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
waitForComplete
public void waitForComplete()
- wait the shell command to complete by typing "quit" or "exit"
findResources
protected Collection<URL> findResources(String path)
- Description copied from class:
AbstractShell
- Returns any classpath resources with the given path
- Specified by:
findResources
in class AbstractShell
- Parameters:
path
- the path for which to search (never null)
- Returns:
null
if the search can't be performed
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
- 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