public class FlowRunner extends Object implements RevisionHandler
Modifier and Type | Class and Description |
---|---|
static class |
FlowRunner.SimpleLogger |
Constructor and Description |
---|
FlowRunner()
Constructor
|
FlowRunner(boolean loadProps,
boolean registerLog) |
Modifier and Type | Method and Description |
---|---|
Environment |
getEnvironment()
Get the environment variables that are in use.
|
Vector |
getFlows()
Get the vector holding the flow(s)
|
String |
getRevision()
Returns the revision string.
|
boolean |
getStartSequentially()
Gets whether Startable beans will be launched sequentially
or all in parallel.
|
void |
load(String fileName)
Load a serialized KnowledgeFlow (either binary or xml)
|
void |
loadBinary(String fileName)
Load a binary serialized KnowledgeFlow
|
void |
loadXML(String fileName)
Load an XML serialized KnowledgeFlow
|
static void |
main(String[] args)
Main method for testing this class.
|
void |
run()
Launch all loaded KnowledgeFlow
|
void |
setEnvironment(Environment env)
Set the environment variables to use.
|
void |
setFlows(Vector beans)
Set the vector holding the flows(s) to run
|
void |
setLog(Logger log) |
void |
setStartSequentially(boolean s)
Set whether to launch Startable beans one after the other
or all in parallel.
|
void |
stopAllFlows() |
void |
waitUntilFinished()
Waits until all flows have finished executing before returning
|
public FlowRunner()
public FlowRunner(boolean loadProps, boolean registerLog)
public void setLog(Logger log)
public void stopAllFlows()
public void waitUntilFinished()
public void load(String fileName) throws Exception
fileName
- the name of the file to load fromException
- if something goes wrongpublic void loadBinary(String fileName) throws Exception
fileName
- the name of the file to load fromException
- if something goes wrongpublic void loadXML(String fileName) throws Exception
fileName
- the name of the file to load fromException
- if something goes wrongpublic Vector getFlows()
public void setFlows(Vector beans)
beans
- the Vector holding the flows to runpublic void setEnvironment(Environment env)
env
- the environment variables to use.public Environment getEnvironment()
public void setStartSequentially(boolean s)
s
- true if Startable beans are to be launched sequentiallypublic boolean getStartSequentially()
public void run() throws Exception
Exception
- if something goes wrong during executionpublic static void main(String[] args)
Usage:
Usage:\n\nFlowRunner
args
- command line argumentspublic String getRevision()
RevisionHandler
getRevision
in interface RevisionHandler
Copyright © 2012 University of Waikato, Hamilton, NZ. All Rights Reserved.