|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object frysk.hpd.Command frysk.hpd.ParameterizedCommand frysk.hpd.StartRun
abstract class StartRun
Due to a lot of similar code in StartCommand/RunCommand this class was created to consolidate most of the methods to one code base.
Nested Class Summary | |
---|---|
private static class |
StartRun.Runner
|
Field Summary | |
---|---|
(package private) HashMap |
procProcArgs
|
(package private) HashMap |
procProcCommand
|
(package private) HashMap |
procTaskDataList
|
(package private) PTSet |
userSet
|
Constructor Summary | |
---|---|
StartRun(String command,
String help1,
String help2)
|
Method Summary | |
---|---|
private String |
asString(String[] params)
asString takes an array of parameters and converts it to a single string of command/params as would be appropriate for a commandline |
(package private) int |
completer(CLI cli,
Input input,
int cursor,
List completions)
Complete the command's parameters. |
void |
interpretCmd(CLI cli,
Input cmd,
Object options,
boolean runToBreak)
|
private boolean |
killProcs(CLI cli)
killProcs loops through the current target set to see if there are any tasks to kill, the philosophy being that all tasks should be killed before |
private String[] |
makeCommand(String[] params,
int parentID,
CLI cli)
makeCommand takes the previous command and a new set of parameters and creates a new command. |
private void |
run(CLI cli,
Input cmd,
String command,
boolean runToBreak,
int taskid)
run takes a passed proc from the target set and runs it |
private void |
setParams(Input cmd,
CLI cli)
setParams will take the passed parameters by the run/start commands and makes them the new current parameters. |
Methods inherited from class frysk.hpd.ParameterizedCommand |
---|
add, complete, help, interpret, interpret, options |
Methods inherited from class frysk.hpd.Command |
---|
description |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
final HashMap procTaskDataList
final HashMap procProcCommand
final HashMap procProcArgs
PTSet userSet
Constructor Detail |
---|
StartRun(String command, String help1, String help2)
Method Detail |
---|
public void interpretCmd(CLI cli, Input cmd, Object options, boolean runToBreak)
private void setParams(Input cmd, CLI cli)
params
- is a String[] containing the new paramscli
- is the current commandline interface objectprivate String[] makeCommand(String[] params, int parentID, CLI cli)
params
- is the String array of parameters passed via a run or start command
private boolean killProcs(CLI cli)
cli
- is the command line object
private void run(CLI cli, Input cmd, String command, boolean runToBreak, int taskid)
cli
- is the commandline objectcmd
- is the command object with all the parameterscommand
- is a string containing the command to runrunToBreak
- true if the process is to run to the first break point
or until it blows up("run" command), false if it should stop
at the first executable statement("start" command)taskid
- the internal target set id that should be used for this processprivate String asString(String[] params)
params
- is a String array with the first position in the array is
the command to be run and the rest of the positions are params
to pass to the command(if any)
int completer(CLI cli, Input input, int cursor, List completions)
ParameterizedCommand
completer
in class ParameterizedCommand
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |