asg.cliche
Class ShellFactory

java.lang.Object
  extended by asg.cliche.ShellFactory

public class ShellFactory
extends java.lang.Object


Method Summary
static Shell createConsoleShell(java.lang.String prompt, java.lang.String hint, java.lang.Object... handlers)
          One of facade methods for operating the Shell.
static Shell createConsoleShell(java.lang.String prompt, java.lang.String hint, java.lang.Object mainHandler)
          Facade method for operating the Shell.
static Shell createConsoleShell(java.lang.String prompt, java.lang.String hint, java.lang.Object mainHandler, MultiMap<java.lang.String,java.lang.Object> auxHandlers)
          Facade method for operating the Shell allowing specification of auxiliary handlers (i.e. handlers that are to be passed to all subshells).
static Shell createSubshell(java.lang.String pathElement, Shell parent, java.lang.String hint, java.lang.Object mainHandler)
          Facade method facilitating the creation of subshell.
static Shell createSubshell(java.lang.String pathElement, Shell parent, java.lang.String hint, java.lang.Object mainHandler, MultiMap<java.lang.String,java.lang.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(java.lang.String prompt,
                                       java.lang.String hint,
                                       java.lang.Object... handlers)
One of facade methods for operating the Shell. Run the obtained Shell with commandLoop().

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

createConsoleShell

public static Shell createConsoleShell(java.lang.String prompt,
                                       java.lang.String hint,
                                       java.lang.Object mainHandler,
                                       MultiMap<java.lang.String,java.lang.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
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:
Shell.Shell(asg.cliche.Shell.Settings, asg.cliche.CommandTable, java.util.List)

createConsoleShell

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

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

createSubshell

public static Shell createSubshell(java.lang.String pathElement,
                                   Shell parent,
                                   java.lang.String hint,
                                   java.lang.Object mainHandler,
                                   MultiMap<java.lang.String,java.lang.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
hint - Hint to be displayed to the user
mainHandler - Command handler
auxHandlers - Aux handlers to be passed to all subshells.
Returns:
subshell

createSubshell

public static Shell createSubshell(java.lang.String pathElement,
                                   Shell parent,
                                   java.lang.String hint,
                                   java.lang.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
hint - Hint to be displayed to the user
mainHandler - Command handler
Returns:
subshell