public class FlowRunner extends java.lang.Object implements FlowExecutor, CommandlineRunnable
| Modifier and Type | Class and Description |
|---|---|
static class |
FlowRunner.SimpleLogger
A simple logging implementation that writes to standard out
|
| Constructor and Description |
|---|
FlowRunner()
Constructor
|
FlowRunner(Settings settings)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
addExecutionFinishedCallback(ExecutionFinishedCallback callback)
Set a callback to notify when flow execution finishes
|
boolean |
flowBusy()
Checks to see if any step(s) are doing work
|
BaseExecutionEnvironment |
getExecutionEnvironment()
Return the execution environment object for this flow executor
|
Flow |
getFlow()
Get the flow to execute
|
boolean |
getLaunchStartPointsSequentially()
Get whether to launch start points sequentially
|
Logger |
getLogger()
Get the log to use
|
LoggingLevel |
getLoggingLevel()
Get the logging level to use
|
Settings |
getSettings()
Get the settings in use when executing the Flow
|
static void |
main(java.lang.String[] args)
Main method for executing the FlowRunner
|
void |
postExecution()
Perform any teardown stuff that might need to happen after execution.
|
void |
preExecution()
Perform any setup stuff that might need to happen before execution.
|
void |
removeExecutionFinishedCallback(ExecutionFinishedCallback callback)
Remove a callback
|
void |
run()
Execute the flow
|
void |
run(java.lang.Object toRun,
java.lang.String[] args)
Run a FlowRunner object
|
void |
runParallel()
Run the flow by launching start points in parallel
|
void |
runSequentially()
Run the flow by launching start points sequentially.
|
void |
setEnvironment(Environment env) |
void |
setExecutionEnvironment(BaseExecutionEnvironment env)
Set the execution environment to use
|
void |
setFlow(Flow flow)
Set the flow to execute
|
void |
setLaunchStartPointsSequentially(boolean s)
Set whether to launch start points sequentially
|
void |
setLogger(Logger logger)
Set the log to use
|
void |
setLoggingLevel(LoggingLevel level)
Set the logging level to use
|
void |
setSettings(Settings settings)
Set the settings to use when executing the Flow
|
void |
stopProcessing()
Attempt to stop processing in all steps
|
void |
waitUntilFinished()
Wait until all the steps are no longer busy
|
boolean |
wasStopped()
Returns true if execution was stopped via the stopProcessing() method
|
public FlowRunner()
public FlowRunner(Settings settings)
public void setSettings(Settings settings)
setSettings in interface FlowExecutorsettings - the settings to usepublic Settings getSettings()
getSettings in interface FlowExecutorpublic void setEnvironment(Environment env)
public static void main(java.lang.String[] args)
args - command line argumentspublic void run(java.lang.Object toRun,
java.lang.String[] args)
throws java.lang.Exception
run in interface CommandlineRunnabletoRun - the FlowRunner object to executeargs - the command line argumentsjava.lang.Exception - if a problem occurspublic void addExecutionFinishedCallback(ExecutionFinishedCallback callback)
addExecutionFinishedCallback in interface FlowExecutorcallback - the callback to notifypublic void removeExecutionFinishedCallback(ExecutionFinishedCallback callback)
removeExecutionFinishedCallback in interface FlowExecutorcallback - the callback to removepublic Flow getFlow()
getFlow in interface FlowExecutorpublic void setFlow(Flow flow)
setFlow in interface FlowExecutorflow - the flow to executepublic Logger getLogger()
getLogger in interface FlowExecutorpublic void setLogger(Logger logger)
setLogger in interface FlowExecutorlogger - the log to usepublic LoggingLevel getLoggingLevel()
getLoggingLevel in interface FlowExecutorpublic void setLoggingLevel(LoggingLevel level)
setLoggingLevel in interface FlowExecutorlevel - the logging level to usepublic boolean getLaunchStartPointsSequentially()
public void setLaunchStartPointsSequentially(boolean s)
s - true if start points are to be launched sequentiallypublic BaseExecutionEnvironment getExecutionEnvironment()
FlowExecutorgetExecutionEnvironment in interface FlowExecutorpublic void setExecutionEnvironment(BaseExecutionEnvironment env)
setExecutionEnvironment in interface FlowExecutorenv - the execution environment to usepublic void run()
throws WekaException
WekaException - if a problem occurspublic void runSequentially()
throws WekaException
runSequentially in interface FlowExecutorWekaException - if a problem occurspublic void runParallel()
throws WekaException
runParallel in interface FlowExecutorWekaException - if a problem occurspublic void waitUntilFinished()
waitUntilFinished in interface FlowExecutorpublic boolean flowBusy()
public void stopProcessing()
stopProcessing in interface FlowExecutorpublic boolean wasStopped()
wasStopped in interface FlowExecutorpublic void preExecution()
throws java.lang.Exception
CommandlineRunnablepreExecution in interface CommandlineRunnablejava.lang.Exception - if a problem occurs during setuppublic void postExecution()
throws java.lang.Exception
CommandlineRunnablepostExecution in interface CommandlineRunnablejava.lang.Exception - if a problem occurs during teardown