|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.globus.cog.gridshell.commands.AbstractCommand
org.globus.cog.gridshell.commands.AbstractShellCommand
org.globus.cog.gridshell.commands.AbstractShellProgram
org.globus.cog.gridshell.commands.gsh.Gsh
This is a controller portion of the shell in a MVC scheme TODO: commands should be in a thread pool, not a new thread each time
| Field Summary | |
Validator |
FILE_VALIDATOR
|
static String |
PARAM_createCommand_commandValue
|
| Fields inherited from class org.globus.cog.gridshell.commands.AbstractShellCommand |
getopt |
| Fields inherited from class org.globus.cog.gridshell.commands.AbstractCommand |
PROPERTY_STATUS_CODE |
| Fields inherited from interface org.globus.cog.gridshell.interfaces.GridShell |
DEFAULT_PROMPT |
| Constructor Summary | |
Gsh()
|
|
| Method Summary | |
void |
acceptCommandState()
Switches to an accepting command state |
void |
createAndExecuteCommand(Map args)
Calls createCommand(Map args).execute() |
Command |
createCommand(Map args)
Creates a command |
AbstractShellCommand |
createCommand(String commandName)
A helper method so that errors are very carefully described. |
static GetOpt |
createGetOpt(AbstractShellCommand command,
Scope scope)
Creates a getopt for given command, adds the help option, and adds the background argument |
GetOpt |
createGetOpt(Scope scope)
Returns the GetOpt object used to parse and validate this command |
Object |
destroy()
Destroys this command - called after the command has been completed |
Object |
execute()
Executes this command |
void |
executeCommand(Command command)
To run a command (ie calls command.execute change states while it runs) |
GridShellApp |
getApplication()
Gets the App Component associated with this GridShell |
Collection |
getAvaialbeCommandNames()
|
Action |
getCloseAction()
Returns the action invoked to close the GridShell |
protected String |
getCommandName(String commandEntered)
Just a helper method to break things down |
ConnectionManager |
getConnectionManager()
|
static String |
getExceptionString(Throwable thrown)
|
GshEngine |
getGshEngine()
|
GridShellSwingGUI |
getGUI()
Gets the GUI Component associated with this GridShell |
Scope |
getManPageMapping()
|
Object |
init(Map args)
Init the super class, then init ourself Requires AbstractActionBinder.init's arguments and gridShellSwingGUI->an instance of gridShellSwingGUI |
void |
initCommand(AbstractShellCommand command,
String commandEntered)
|
Object |
kill()
Kills this command |
void |
processCommandState()
Switches to a processing state |
void |
propertyChange(PropertyChangeEvent pcEvent)
|
Object |
resume()
Resumes this command |
void |
setApplication(GridShellApp nApp)
Allows applications to be set by new shells |
Object |
suspend()
Suspends this command |
| Methods inherited from class org.globus.cog.gridshell.commands.AbstractShellProgram |
addCommand, getCommands, removeCommand |
| Methods inherited from class org.globus.cog.gridshell.commands.AbstractShellCommand |
createAbstractShellCommand, getCredentials, getGetOpt, getGridShell, getGsh, run, toString |
| Methods inherited from class org.globus.cog.gridshell.commands.AbstractCommand |
addPropertyChangeListener, addPropertyChangeListener, arrayToMap, compareTo, getIdentity, getParent, getResult, getScope, getStatus, removePropertyChangeListener, setResult, setStatusCode, setStatusCompleted, setStatusFailed, setStatusFailed, unsupported |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.globus.cog.gridshell.interfaces.Program |
addCommand, getCommands, removeCommand |
| Methods inherited from interface org.globus.cog.gridshell.interfaces.Command |
getIdentity, getParent, getResult, getScope, getStatus, setStatusCode |
| Methods inherited from interface java.lang.Runnable |
run |
| Methods inherited from interface org.globus.cog.gridshell.interfaces.PropertyChangeNotifier |
addPropertyChangeListener, addPropertyChangeListener, removePropertyChangeListener |
| Methods inherited from interface java.lang.Comparable |
compareTo |
| Field Detail |
public static final String PARAM_createCommand_commandValue
public final Validator FILE_VALIDATOR
| Constructor Detail |
public Gsh()
| Method Detail |
public ConnectionManager getConnectionManager()
public Action getCloseAction()
GridShell
getCloseAction in interface GridShell
public Object init(Map args)
throws Exception
init in interface Commandinit in class AbstractShellCommandException
public Command createCommand(Map args)
throws Exception
Program
createCommand in interface Programargs -
Exception
public void initCommand(AbstractShellCommand command,
String commandEntered)
throws Exception
Exceptionpublic void executeCommand(Command command)
Program
executeCommand in interface Programcommand - public void createAndExecuteCommand(Map args)
Program
createAndExecuteCommand in interface Program
public Object execute()
throws Exception
Command
execute in interface CommandException
public Object destroy()
throws Exception
Command
destroy in interface CommandException
public Object suspend()
throws Exception
Command
suspend in interface Commandsuspend in class AbstractShellCommandException
public Object resume()
throws Exception
Command
resume in interface Commandresume in class AbstractShellCommandException
public Object kill()
throws Exception
Command
kill in interface Commandkill in class AbstractShellCommandExceptionpublic void propertyChange(PropertyChangeEvent pcEvent)
propertyChange in interface PropertyChangeListenerpublic static String getExceptionString(Throwable thrown)
public void processCommandState()
GridShell
processCommandState in interface GridShellpublic void acceptCommandState()
GridShell
acceptCommandState in interface GridShellpublic GridShellSwingGUI getGUI()
GridShell
getGUI in interface GridShellpublic GridShellApp getApplication()
GridShell
getApplication in interface GridShellpublic void setApplication(GridShellApp nApp)
GridShell
setApplication in interface GridShellnApp - - the new application
public AbstractShellCommand createCommand(String commandName)
throws Exception
commandName -
Exceptionpublic GetOpt createGetOpt(Scope scope)
AbstractShellCommand
createGetOpt in class AbstractShellCommandscope -
public static GetOpt createGetOpt(AbstractShellCommand command,
Scope scope)
command - scope -
protected String getCommandName(String commandEntered)
commandEntered -
public Collection getAvaialbeCommandNames()
public Scope getManPageMapping()
public GshEngine getGshEngine()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||