abbot.script
Class ForkedStepRunner
java.lang.Object
|
+--abbot.script.StepRunner
|
+--abbot.script.ForkedStepRunner
- public class ForkedStepRunner
- extends StepRunner
A StepRunner that runs the step in a separate VM. Behavior should be
indistinguishable from the base StepRunner.
Method Summary |
(package private) static Step |
decodeStep(Sequence root,
String code)
|
(package private) static String |
encodeStep(Sequence root,
Step step)
Encode the given step into a set of indices. |
(package private) Process |
fork(String vmargs)
Launch a new process, using this class as the main class. |
(package private) Process |
fork(String vmargs,
String[] cmdArgs)
|
static void |
main(String[] args)
Provide means to control execution and feedback of a script in a
separate process. |
void |
runStep(Step step)
Running the step in a separate VM should be indistinguishable from
running a regular script. |
Methods inherited from class abbot.script.StepRunner |
addStepListener, clearErrors, fireStepEnd, fireStepError, fireStepEvent, fireStepFailure, fireStepProgress, fireStepStart, getError, getStopOnError, getStopOnFailure, launch, removeStepListener, run, setError, setStopOnError, setStopOnFailure, setTerminateOnError, setUp, stop, stop, stopped, tearDown, terminate |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LAUNCH_TIMEOUT
int LAUNCH_TIMEOUT
TERMINATE_TIMEOUT
int TERMINATE_TIMEOUT
ForkedStepRunner
public ForkedStepRunner()
fork
Process fork(String vmargs,
String[] cmdArgs)
throws IOException
fork
Process fork(String vmargs)
throws UnknownHostException,
IOException
- Launch a new process, using this class as the main class.
runStep
public void runStep(Step step)
throws Throwable
- Running the step in a separate VM should be indistinguishable from
running a regular script. When running as master, nothing actually
runs locally. We just fork a subprocess and run the script in that,
reporting back its progress as if it were running locally.
- Overrides:
runStep
in class StepRunner
decodeStep
static Step decodeStep(Sequence root,
String code)
encodeStep
static String encodeStep(Sequence root,
Step step)
- Encode the given step into a set of indices.
main
public static void main(String[] args)
- Provide means to control execution and feedback of a script in a
separate process.
Copyright © 2002-2003 Timothy Wall. All Rights Reserved.
Abbot is hosted on