|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.cau.cs.kieler.sim.kiem.automated.execution.AutomationManager
public final class AutomationManager
The manager for handling the actual execution. It dispatches the execution job, sets up the result list and execution, initializes the DataComponents and the execution, steps through until all components are finished and then gathers results and terminates the execution.
Nested Class Summary | |
---|---|
static interface |
AutomationManager.ExecutionListener
Interface for all components that are interested in the state of the current execution. |
Field Summary |
---|
Fields inherited from interface de.cau.cs.kieler.core.ui.errorhandler.GenericErrorHandler.StatusListener |
---|
DONT_CARE |
Method Summary | |
---|---|
void |
addListener(AutomationManager.ExecutionListener listener)
Add a new listener. |
protected List<IterationResult> |
doAutomatedExecution(IPath[] executionFiles,
List<IPath> modelFiles,
List<KiemProperty> properties,
IProgressMonitor monitorParam,
boolean headless)
Automated execution of a list of predefined schedules. |
protected List<IterationResult> |
doAutomatedExecution(List<ScheduleData> schedules,
List<IPath> modelFiles,
List<KiemProperty> properties,
IProgressMonitor monitorParam,
boolean headless)
Automated execution of a list of predefined schedules. |
void |
executeAsync(IPath[] executionFiles,
List<IPath> modelFiles,
List<KiemProperty> properties,
boolean headless)
Trigger an execution with a list of execution files, a list of model files and a list of properties. |
void |
executeAsync(List<ScheduleData> selected,
List<IPath> modelFiles,
List<KiemProperty> properties,
boolean headless)
Trigger an execution with a list of schedules, a list of model files and a list of properties. |
static AutomationManager |
getInstance()
Getter for the instance. |
boolean |
isRunning()
Determine whether or not the execution manager is currently running an automated execution. |
void |
notifyExecutionFinished(List<IterationResult> results)
Notify all observers that the execution has finished. |
void |
notifyOnErrorPause()
Tell the automation manager that the execution was paused due to an error. |
void |
notifyOnErrorStop()
Tell the automation manager that the execution was stopped due to an error. |
void |
notifyOnStepFinished()
Tell the automation manager that a step was processed and that the execution can resume. |
void |
notifyOnUserPause()
Tell the automation manager that the user paused the execution. |
void |
notifyOnUserStop()
Tell the automation manager that the user stopped the execution. |
void |
removeListener(AutomationManager.ExecutionListener listener)
Remove a listener. |
int |
reroute(StatusAdapter statusAdapter,
int style)
Reroute the exception to the given listener. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static AutomationManager getInstance()
public boolean isRunning()
protected List<IterationResult> doAutomatedExecution(IPath[] executionFiles, List<IPath> modelFiles, List<KiemProperty> properties, IProgressMonitor monitorParam, boolean headless)
executionFiles
- the list of execution filesmodelFiles
- the list of model files for which to run the executionproperties
- the list of properties that should be setmonitorParam
- the progress monitorheadless
- true if the run should be headless
protected List<IterationResult> doAutomatedExecution(List<ScheduleData> schedules, List<IPath> modelFiles, List<KiemProperty> properties, IProgressMonitor monitorParam, boolean headless)
schedules
- the list of schedules.modelFiles
- the list of model files for which to run the executionproperties
- the list of properties that should be setmonitorParam
- the progress monitorheadless
- true if the run should be headless
public void executeAsync(IPath[] executionFiles, List<IPath> modelFiles, List<KiemProperty> properties, boolean headless)
Trigger an execution with a list of execution files, a list of model files and a list of properties. Each combination of execution and model file will be stepped through until no component requests another step. After that the execution will be stopped and move on to the next combination unless one of the component requests that this combination is run again.
This method is part of the KIEMAutos API and can be accessed from any plugin.
The method will return asynchronously. Callers that want to be notified of the results must register themselves as a listener on the instance of the execution manager.
executionFiles
- the selected locationsmodelFiles
- the model filesproperties
- the propertiesheadless
- if true no GUI output will be generatedpublic void executeAsync(List<ScheduleData> selected, List<IPath> modelFiles, List<KiemProperty> properties, boolean headless)
Trigger an execution with a list of schedules, a list of model files and a list of properties. Each combination of execution and model file will be stepped through until no component requests another step. After that the execution will be stopped and move on to the next combination unless one of the component requests that this combination is run again.
This method is part of the KIEMAutos API and can be accessed from any plugin.
The method will return asynchronously. Callers that want to be notified of the results must register themselves as a listener on the instance of the execution manager.
selected
- the selected schedulesmodelFiles
- the model filesproperties
- the propertiesheadless
- if true no GUI output will be generatedpublic void notifyOnErrorPause()
public void notifyOnErrorStop()
public void notifyOnStepFinished()
public void notifyOnUserPause()
public void notifyOnUserStop()
public int reroute(StatusAdapter statusAdapter, int style)
GenericErrorHandler.StatusListener.DONT_CARE
style.
reroute
in interface GenericErrorHandler.StatusListener
statusAdapter
- the status adapterstyle
- the style
public void addListener(AutomationManager.ExecutionListener listener)
listener
- the listener to addpublic void notifyExecutionFinished(List<IterationResult> results)
results
- the results of the executionpublic void removeListener(AutomationManager.ExecutionListener listener)
listener
- the listener to remove
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |