org.springframework.shell.core
Class JLineShellComponent

java.lang.Object
  extended by org.springframework.shell.event.AbstractShellStatusPublisher
      extended by org.springframework.shell.core.AbstractShell
          extended by org.springframework.shell.core.JLineShell
              extended by 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

Field Summary
 
Fields inherited from class org.springframework.shell.core.JLineShell
reader, statusListener
 
Fields inherited from class org.springframework.shell.core.AbstractShell
completionKeys, exitShellRequest, inBlockComment, logger, ROO_PROMPT, shellPrompt
 
Fields inherited from class org.springframework.shell.event.AbstractShellStatusPublisher
shellStatus, shellStatusListeners
 
Fields inherited from interface org.springframework.shell.core.Shell
WINDOW_TITLE_SLOT
 
Constructor Summary
JLineShellComponent()
           
 
Method Summary
 void customizePlugin()
           
protected  Collection<URL> findResources(String path)
          Returns any classpath resources with the given path
protected  ExecutionStrategy getExecutionStrategy()
           
protected  String getHistoryFileName()
          get history file name from provider.
protected  Parser getParser()
           
protected  String getProductName()
          get product name
protected  String getPromptText()
          get prompt text from provider.
 SimpleParser getSimpleParser()
           
 String getStartupNotifications()
           
protected  String getVersion()
          get version information
 String getWelcomeMessage()
          get the welcome message at start.
 boolean isRunning()
           
 void printBannerAndWelcome()
           
 void setApplicationContext(ApplicationContext applicationContext)
           
 void setPrintBanner(boolean printBanner)
           
 void start()
           
 void stop()
           
 void waitForComplete()
          wait the shell command to complete by typing "quit" or "exit"
 
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 org.springframework.shell.event.AbstractShellStatusPublisher
addShellStatusListener, getShellStatus, removeShellStatusListener, setShellStatus, setShellStatus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.springframework.shell.core.Shell
executeCommand, getExitShellRequest, getHome
 
Methods inherited from interface org.springframework.shell.event.ShellStatusProvider
addShellStatusListener, getShellStatus, removeShellStatusListener
 
Methods inherited from interface org.springframework.shell.core.ShellPromptAccessor
getShellPrompt
 

Constructor Detail

JLineShellComponent

public JLineShellComponent()
Method Detail

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