Class MeasurementSource
java.lang.Object
org.palladiosimulator.metricspec.metricentity.MetricEntity
org.palladiosimulator.measurementframework.listener.MeasurementSource
- All Implemented Interfaces:
org.palladiosimulator.commons.designpatterns.IAbstractObservable<IMeasurementSourceListener>,org.palladiosimulator.metricspec.metricentity.IMetricEntity
public abstract class MeasurementSource
extends org.palladiosimulator.metricspec.metricentity.MetricEntity
implements org.palladiosimulator.commons.designpatterns.IAbstractObservable<IMeasurementSourceListener>
AbstractMeasureProvider sources provide measurements from analyzers, e.g., by providing the
measurements from probes. To provide such measurements, they implement the observer pattern.
Observers have to implement the
IMeasurementSourceListener interface to get informed
about new measurements.-
Constructor Summary
ConstructorsConstructorDescriptionMeasurementSource(org.palladiosimulator.metricspec.MetricDescription metricDesciption) Default constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddObserver(IMeasurementSourceListener observer) protected final Collection<IMeasurementSourceListener>Getter for the list of registered observers (aka.protected final voidnotifyMeasurementSourceListener(MeasuringValue newMeasurement) Triggers the call-back method for observers with the given, new measurement.voidremoveObserver(IMeasurementSourceListener observer) Methods inherited from class org.palladiosimulator.metricspec.metricentity.MetricEntity
getMetricDesciption, isCompatibleWith, setMetricDescription
-
Constructor Details
-
MeasurementSource
public MeasurementSource(org.palladiosimulator.metricspec.MetricDescription metricDesciption) Default constructor. Nothing special.- Parameters:
metricDesciption- Metric description as needed by the superclass.
-
-
Method Details
-
addObserver
- Specified by:
addObserverin interfaceorg.palladiosimulator.commons.designpatterns.IAbstractObservable<IMeasurementSourceListener>
-
removeObserver
- Specified by:
removeObserverin interfaceorg.palladiosimulator.commons.designpatterns.IAbstractObservable<IMeasurementSourceListener>
-
getMeasurementSourceListeners
Getter for the list of registered observers (aka. measurement source listeners).- Returns:
- The list of observers.
-
notifyMeasurementSourceListener
Triggers the call-back method for observers with the given, new measurement.- Parameters:
newMeasurement- The new measurement observers are informed about.
-