Package edu.kit.ipd.sdq.eventsim.api
Interface ISimulationMiddleware
-
- All Known Implementing Classes:
SimulationMiddleware
public interface ISimulationMiddlewareThe simulation middleware provides infrastructure services.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intgetMeasurementCount()Gives access the the amount of measurements done in the current simulation.de.uka.ipd.sdq.probfunction.math.IRandomGeneratorgetRandomGenerator()ISimulationConfigurationgetSimulationConfiguration()Gives access to the simulation configuration provided by the user on launch of the simulation run.de.uka.ipd.sdq.simulation.abstractsimengine.ISimulationControlgetSimulationControl()Gives access to the simulation control instancede.uka.ipd.sdq.simulation.abstractsimengine.ISimulationModelgetSimulationModel()Gives access to the abstract sim engine simulation model, which is the core of the simulation.voidincreaseMeasurementCount()Increases the simulation measurement count.booleanisStopping()<T extends SimulationEvent>
voidregisterEventHandler(Class<T> eventType, IEventHandler<T> handler)Registers a new event handler for events of a specified type.<T extends SimulationEvent>
voidregisterEventHandler(Class<T> eventType, IEventHandler<T> handler, String filter)voidstartSimulation(de.uka.ipd.sdq.simulation.IStatusObserver statusObserver)Starts a simulation run.voidstopSimulation()Stops the simulation run.voidtriggerEvent(SimulationEvent event)Triggers the specified simulation event.
-
-
-
Method Detail
-
startSimulation
void startSimulation(de.uka.ipd.sdq.simulation.IStatusObserver statusObserver)
Starts a simulation run.- Parameters:
statusObserver- A status observer which indicates the simulation progress in the GUI.
-
stopSimulation
void stopSimulation()
Stops the simulation run.
-
isStopping
boolean isStopping()
- Returns:
trueif a simulation stop has been requested;falseelse
-
getSimulationConfiguration
ISimulationConfiguration getSimulationConfiguration()
Gives access to the simulation configuration provided by the user on launch of the simulation run.- Returns:
- A simulation configuration
-
getSimulationModel
de.uka.ipd.sdq.simulation.abstractsimengine.ISimulationModel getSimulationModel()
Gives access to the abstract sim engine simulation model, which is the core of the simulation. It basically represents the main simulation timeline.- Returns:
- The simulation model
-
getSimulationControl
de.uka.ipd.sdq.simulation.abstractsimengine.ISimulationControl getSimulationControl()
Gives access to the simulation control instance- Returns:
- The simulation control
-
triggerEvent
void triggerEvent(SimulationEvent event)
Triggers the specified simulation event. Does not return to the caller until delivery of the event is completed.- Parameters:
event- the event to trigger
-
registerEventHandler
<T extends SimulationEvent> void registerEventHandler(Class<T> eventType, IEventHandler<T> handler)
Registers a new event handler for events of a specified type.- Parameters:
eventType- The event type to listen forhandler- The event handler
-
registerEventHandler
<T extends SimulationEvent> void registerEventHandler(Class<T> eventType, IEventHandler<T> handler, String filter)
-
getMeasurementCount
int getMeasurementCount()
Gives access the the amount of measurements done in the current simulation. One measurement means one user request was entirely processed.- Returns:
- The amount of measurement for the current simulation run.
-
increaseMeasurementCount
void increaseMeasurementCount()
Increases the simulation measurement count. One measurement means one user request was entirely processed.
-
getRandomGenerator
de.uka.ipd.sdq.probfunction.math.IRandomGenerator getRandomGenerator()
-
-