Class ExampleTakeCurrentTimeProbe
java.lang.Object
org.palladiosimulator.probeframework.probes.Probe
org.palladiosimulator.probeframework.probes.TriggeredProbe
org.palladiosimulator.probeframework.probes.BasicTriggeredProbe<V,Q>
org.palladiosimulator.probeframework.probes.BasicObjectStateProbe<SimpleSimulationContext,Double,javax.measure.quantity.Duration>
org.palladiosimulator.probeframework.probes.example.ExampleTakeCurrentTimeProbe
- All Implemented Interfaces:
org.palladiosimulator.commons.designpatterns.IAbstractObservable<IProbeListener>,org.palladiosimulator.metricspec.metricentity.IMetricEntity
public class ExampleTakeCurrentTimeProbe
extends BasicObjectStateProbe<SimpleSimulationContext,Double,javax.measure.quantity.Duration>
Measures a point in time metric (in
SI.SECOND) by taking the current simulation time of a
simulation (observed state object). This class uses SimpleSimulationContext as an
example simulation state object.-
Field Summary
Fields inherited from class org.palladiosimulator.probeframework.probes.Probe
metricEntityDelegate -
Constructor Summary
ConstructorsConstructorDescriptionExampleTakeCurrentTimeProbe(SimpleSimulationContext simulationContext) Default constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected javax.measure.Measure<Double,javax.measure.quantity.Duration> getBasicMeasure(RequestContext measurementContext) Measures the current simulation time as requested from the simulation context (observed state object).Methods inherited from class org.palladiosimulator.probeframework.probes.BasicObjectStateProbe
getStateObjectMethods inherited from class org.palladiosimulator.probeframework.probes.BasicTriggeredProbe
doMeasureMethods inherited from class org.palladiosimulator.probeframework.probes.TriggeredProbe
takeMeasurement, takeMeasurementMethods inherited from class org.palladiosimulator.probeframework.probes.Probe
addObserver, getMetricDesciption, isCompatibleWith, notifyMeasurementSourceListener, removeObserverMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.palladiosimulator.metricspec.metricentity.IMetricEntity
getMetricDesciption, isCompatibleWith
-
Constructor Details
-
ExampleTakeCurrentTimeProbe
Default constructor.- Parameters:
simulationContext- The observer object is a simulation state object, thus, allowing to request its current simulation time.
-
-
Method Details
-
getBasicMeasure
protected javax.measure.Measure<Double,javax.measure.quantity.Duration> getBasicMeasure(RequestContext measurementContext) Measures the current simulation time as requested from the simulation context (observed state object).- Specified by:
getBasicMeasurein classBasicTriggeredProbe<Double,javax.measure.quantity.Duration> - Parameters:
measurementContext- The measurement context for this probe.- Returns:
- The new measure.
-