Class Reconfigurator
- java.lang.Object
-
- org.palladiosimulator.commons.designpatterns.AbstractObservable<IReconfigurationListener>
-
- org.palladiosimulator.simulizar.reconfiguration.Reconfigurator
-
- All Implemented Interfaces:
org.palladiosimulator.commons.designpatterns.IAbstractObservable<IReconfigurationListener>
public class Reconfigurator extends org.palladiosimulator.commons.designpatterns.AbstractObservable<IReconfigurationListener>
Class whose objects will listen on changes in the PCM@Runtime (i.e., they track changes in theRuntimeMeasurementModel
) and trigger reconfigurations respectively.
-
-
Constructor Summary
Constructors Constructor Description Reconfigurator(de.uka.ipd.sdq.simucomframework.model.SimuComModel model, RuntimeMeasurementModel rmModel, de.uka.ipd.sdq.simulation.abstractsimengine.ISimulationControl simulationcontrol, List<IReconfigurationEngine> reconfigurators, SimuLizarWorkflowConfiguration configuration)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
checkAndExecuteReconfigurations(Notification notification)
Method which is called on a change in the RuntimeMeasurement.void
cleanUp()
Detach all model listeners and request termination of reconfiguration process.SimuLizarWorkflowConfiguration
getConfiguration()
protected EObject
getMonitoredElement(Notification notification)
Retrieve the monitored PCM element from the RuntimeMeasurement change event.List<AbstractReconfigurationLoader>
getReconfigurationLoaders()
ReconfigurationProcess
getReconfigurationProcess()
Gets the current reconfiguration process.void
startListening()
Setup all listeners to listen for their respective model changes.
-
-
-
Constructor Detail
-
Reconfigurator
public Reconfigurator(de.uka.ipd.sdq.simucomframework.model.SimuComModel model, RuntimeMeasurementModel rmModel, de.uka.ipd.sdq.simulation.abstractsimengine.ISimulationControl simulationcontrol, List<IReconfigurationEngine> reconfigurators, SimuLizarWorkflowConfiguration configuration)
Constructor.- Parameters:
model
-modelAccessFactory
- Access factory for model access interfaces.reconfigurators
- Set of reconfigurators which will be triggered as soon as new, interesting monitoring data arrives.
-
-
Method Detail
-
startListening
public void startListening()
Setup all listeners to listen for their respective model changes.
-
cleanUp
public void cleanUp()
Detach all model listeners and request termination of reconfiguration process.
-
checkAndExecuteReconfigurations
protected void checkAndExecuteReconfigurations(Notification notification)
Method which is called on a change in the RuntimeMeasurement. All reconfigurators are informed and can check for potential reconfigurations.- Parameters:
notification
- The notification event, which describes a change in the RuntimeMeasurement model.
-
getMonitoredElement
protected EObject getMonitoredElement(Notification notification)
Retrieve the monitored PCM element from the RuntimeMeasurement change event.- Parameters:
notification
- The RuntimeMeasurment change event.- Returns:
- The PCM element whose monitoring triggered the change event.
-
getReconfigurationProcess
public ReconfigurationProcess getReconfigurationProcess()
Gets the current reconfiguration process.- Returns:
- The current
ReconfigurationProcess
.
-
getConfiguration
public SimuLizarWorkflowConfiguration getConfiguration()
-
getReconfigurationLoaders
public List<AbstractReconfigurationLoader> getReconfigurationLoaders()
-
-