org.lsst.ccs.shell
Class ShellFactory

java.lang.Object
  extended by org.lsst.ccs.shell.ShellFactory

public class ShellFactory
extends Object

Author:
ASG

Method Summary
static Shell createConsoleShell(String prompt, String appName, Object... handlers)
          One of facade methods for operating the Shell.
static Shell createConsoleShell(String prompt, String appName, Object mainHandler)
          Facade method for operating the Shell.
static Shell createConsoleShell(String prompt, String appName, Object mainHandler, MultiMap<String,Object> auxHandlers)
          Facade method for operating the Shell allowing specification of auxiliary handlers (i.e.
static Shell createSubshell(String pathElement, Shell parent, String appName, Object mainHandler)
          Facade method facilitating the creation of subshell.
static Shell createSubshell(String pathElement, Shell parent, String appName, Object mainHandler, MultiMap<String,Object> auxHandlers)
          Facade method facilitating the creation of subshell.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createConsoleShell

public static Shell createConsoleShell(String prompt,
                                       String appName,
                                       Object... handlers)
One of facade methods for operating the Shell. Run the obtained Shell with commandLoop().

Parameters:
prompt - Prompt to be displayed
appName - The app name string
handlers - Command handlers
Returns:
Shell that can be either further customized or run directly by calling commandLoop().
See Also:
asg.cliche.Shell#Shell(asg.cliche.Shell.Settings, asg.cliche.CommandTable, java.util.List)

createConsoleShell

public static Shell createConsoleShell(String prompt,
                                       String appName,
                                       Object mainHandler,
                                       MultiMap<String,Object> auxHandlers)
Facade method for operating the Shell allowing specification of auxiliary handlers (i.e. handlers that are to be passed to all subshells). Run the obtained Shell with commandLoop().

Parameters:
prompt - Prompt to be displayed
appName - The app name string
mainHandler - Main command handler
auxHandlers - Aux handlers to be passed to all subshells.
Returns:
Shell that can be either further customized or run directly by calling commandLoop().
See Also:
asg.cliche.Shell#Shell(asg.cliche.Shell.Settings, asg.cliche.CommandTable, java.util.List)

createConsoleShell

public static Shell createConsoleShell(String prompt,
                                       String appName,
                                       Object mainHandler)
Facade method for operating the Shell. Run the obtained Shell with commandLoop().

Parameters:
prompt - Prompt to be displayed
appName - The app name string
mainHandler - Command handler
Returns:
Shell that can be either further customized or run directly by calling commandLoop().
See Also:
asg.cliche.Shell#Shell(asg.cliche.Shell.Settings, asg.cliche.CommandTable, java.util.List)

createSubshell

public static Shell createSubshell(String pathElement,
                                   Shell parent,
                                   String appName,
                                   Object mainHandler,
                                   MultiMap<String,Object> auxHandlers)
Facade method facilitating the creation of subshell. Subshell is created and run inside Command method and shares the same IO and naming strategy. Run the obtained Shell with commandLoop().

Parameters:
pathElement - sub-prompt
parent - Shell to be subshell'd
appName - The app name string
mainHandler - Command handler
auxHandlers - Aux handlers to be passed to all subshells.
Returns:
subshell

createSubshell

public static Shell createSubshell(String pathElement,
                                   Shell parent,
                                   String appName,
                                   Object mainHandler)
Facade method facilitating the creation of subshell. Subshell is created and run inside Command method and shares the same IO and naming strtategy. Run the obtained Shell with commandLoop().

Parameters:
pathElement - sub-prompt
parent - Shell to be subshell'd
appName - The app name string
mainHandler - Command handler
Returns:
subshell


Copyright © 2013 LSST. All Rights Reserved.