de.cau.cs.kieler.sim.kiem.automated
Class AbstractAutomationListener

java.lang.Object
  extended by de.cau.cs.kieler.sim.kiem.automated.AbstractAutomationListener
All Implemented Interfaces:
IAutomationListener
Direct Known Subclasses:
AutomationListener

public abstract class AbstractAutomationListener
extends Object
implements IAutomationListener

Abstract implementation of the automation listener.

Rating red

Constructor Summary
AbstractAutomationListener()
           
 
Method Summary
 void doPostAutomationProcessing()
          This method is called immediately after the entire automation has finished.
 void doPreAutomationProcessing()
          This method is called immediately before the automation starts and gives listeners a chance to perform some action like opening views or loading plugins.
 void executionFileStarted(IPath executionFile, Exception exception)
          This method indicates that the automation tried to start a new execution file.
 void receiveIterationResult(IterationResult result)
          Publishes the result of the currently running iteration.
 void receiveIterationResult(List<IterationResult> results)
          Publishes a list of results of the last couple of iterations.
 void receiveModelFileResults(IPath executionFile, List<AbstractResult> results)
          This method will pass all summarized model file results produced by the given execution file.
 void refresh()
          Notifies the listeners that information in the already produced results may have changed and that the listeners should re-check the values.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractAutomationListener

public AbstractAutomationListener()
Method Detail

doPostAutomationProcessing

public void doPostAutomationProcessing()
This method is called immediately after the entire automation has finished.

Specified by:
doPostAutomationProcessing in interface IAutomationListener

doPreAutomationProcessing

public void doPreAutomationProcessing()
This method is called immediately before the automation starts and gives listeners a chance to perform some action like opening views or loading plugins.

Specified by:
doPreAutomationProcessing in interface IAutomationListener

receiveModelFileResults

public void receiveModelFileResults(IPath executionFile,
                                    List<AbstractResult> results)
This method will pass all summarized model file results produced by the given execution file. It will be called once the execution file was completely simulated.

Specified by:
receiveModelFileResults in interface IAutomationListener
Parameters:
executionFile - the execution file
results - the list of model file results

executionFileStarted

public void executionFileStarted(IPath executionFile,
                                 Exception exception)
This method indicates that the automation tried to start a new execution file. If starting the file failed the exception will be passed.

Specified by:
executionFileStarted in interface IAutomationListener
Parameters:
executionFile - the path to the execution file
exception - an exception that caused the file to fail, null if the file was started successfully

receiveIterationResult

public void receiveIterationResult(IterationResult result)
Publishes the result of the currently running iteration. This result might NOT be complete yet and some information in it might be changed or updated until the iteration finishes. All listeners should re-check the iteration results when the refresh method is called.

Specified by:
receiveIterationResult in interface IAutomationListener
Parameters:
result - the result

receiveIterationResult

public void receiveIterationResult(List<IterationResult> results)
Publishes a list of results of the last couple of iterations. The results might NOT be complete yet and some information in them might be changed or updated until the model file finishes. All listeners should re-check the iteration results when the refresh method is called.

Specified by:
receiveIterationResult in interface IAutomationListener
Parameters:
results - the results

refresh

public void refresh()
Notifies the listeners that information in the already produced results may have changed and that the listeners should re-check the values. A change should only happen in the results connected to the currently simulated execution file.

Specified by:
refresh in interface IAutomationListener