de.cau.cs.kieler.sim.kiem.execution
Class InitializeExecution

java.lang.Object
  extended by de.cau.cs.kieler.sim.kiem.execution.InitializeExecution
All Implemented Interfaces:
Runnable

public class InitializeExecution
extends Object
implements Runnable

This implements the concurrent initialization that can be aborted from outside e.g. by user cancellation.

Rating red

Constructor Summary
InitializeExecution(KiemPlugin kIEMInstanceParam)
          The constructor for initializing an execution.
 
Method Summary
 void cancelInitialization()
          Cancel the initialization.
 boolean isInitializing()
          Checks whether initializing is true.
 void run()
          Initializes the Execution.
 boolean wasSuccessful()
          Returns true, if last initialization was successful.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InitializeExecution

public InitializeExecution(KiemPlugin kIEMInstanceParam)
The constructor for initializing an execution.

Parameters:
kIEMInstanceParam - the kiem instance
Method Detail

isInitializing

public boolean isInitializing()
Checks whether initializing is true.

Returns:
true, if is initializing

cancelInitialization

public void cancelInitialization()
Cancel the initialization.


wasSuccessful

public boolean wasSuccessful()
Returns true, if last initialization was successful.

Returns:
true, if successful

run

public void run()
Initializes the Execution. This is one of the heart-methods of this plug-in. It does the following tasks:

(1) Check if there are any (enabled) DataProducers or DataConsumers.
(2) Check if all DataComponent's properties are set correctly
(3) Grab all interface variables provided by the DataComponents.
(4) Distribute the union of all the variables to all DataComponents.
(5) Initialize the DataComponents
(6) Create an run the Execution thread

This method returns true if the execution is successfully initialized or if the execution thread already exists, hence the execution is not null.

Specified by:
run in interface Runnable