Class SimpleSimulationContext
- java.lang.Object
-
- org.palladiosimulator.probeframework.probes.example.SimpleSimulationContext
-
public class SimpleSimulationContext extends Object
Represents a simple simulation context for demonstration purposes.The simulation context holds the current simulation time as well as available active resources.
-
-
Constructor Summary
Constructors Constructor Description SimpleSimulationContext()
Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addActiveResource(String name, ASimpleActiveResource resource)
Adds an active resource to this simulation.ASimpleActiveResource
getActiveResource(String name)
Getter method for the active resource identified by the given name.double
getSimulatedTime()
Getter method for passed simulation time.void
setSimulatedTime(double simulatedTime)
Setter for the passed simulation time.
-
-
-
Method Detail
-
getSimulatedTime
public double getSimulatedTime()
Getter method for passed simulation time.- Returns:
- Passed simulation time.
-
setSimulatedTime
public void setSimulatedTime(double simulatedTime)
Setter for the passed simulation time.- Parameters:
simulatedTime
- Passed simulation time.
-
addActiveResource
public void addActiveResource(String name, ASimpleActiveResource resource)
Adds an active resource to this simulation.- Parameters:
name
- The name of the active resource, used as a reference key.resource
- THe active resource to be added.
-
getActiveResource
public ASimpleActiveResource getActiveResource(String name)
Getter method for the active resource identified by the given name.- Parameters:
name
- The name of the resource to be returned.- Returns:
- The active resource of interest.
-
-