Class Probe
- java.lang.Object
-
- org.palladiosimulator.probeframework.probes.Probe
-
- All Implemented Interfaces:
org.palladiosimulator.commons.designpatterns.IAbstractObservable<IProbeListener>,org.palladiosimulator.metricspec.metricentity.IMetricEntity
- Direct Known Subclasses:
EventProbe,TriggeredProbe
public abstract class Probe extends Object implements org.palladiosimulator.commons.designpatterns.IAbstractObservable<IProbeListener>, org.palladiosimulator.metricspec.metricentity.IMetricEntity
This class is the abstract super class for all probe implementations. All specific probes have to (indirectly) inherit from this class. Because probes are typed by a metric, they inherit fromMetricEntity. For example, a probe taking the state of a passive resource would be typed by theSTATE_OF_PASSIVE_RESOURCE_METRIC. Because calculators have to observe such probes, this class also implements theIAbstractObservableinterface. Calculators have to implement theIProbeListenerinterface to get informed about new probe measurements.
-
-
Field Summary
Fields Modifier and Type Field Description protected org.palladiosimulator.metricspec.metricentity.IMetricEntitymetricEntityDelegateDelegate object for implementing IMetricEntity.
-
Constructor Summary
Constructors Modifier Constructor Description protectedProbe(org.palladiosimulator.metricspec.MetricDescription metricDesciption)Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddObserver(IProbeListener observer)org.palladiosimulator.metricspec.MetricDescriptiongetMetricDesciption()booleanisCompatibleWith(org.palladiosimulator.metricspec.MetricDescription other)protected voidnotifyMeasurementSourceListener(ProbeMeasurement newMeasurement)Notifies all registered observers about a new probe measurement.voidremoveObserver(IProbeListener observer)
-
-
-
Method Detail
-
notifyMeasurementSourceListener
protected void notifyMeasurementSourceListener(ProbeMeasurement newMeasurement)
Notifies all registered observers about a new probe measurement.- Parameters:
newMeasurement- The new probe measurement.- Throws:
IllegalArgumentException- If the new measurement does not conform to the metric of this probe.
-
addObserver
public void addObserver(IProbeListener observer)
- Specified by:
addObserverin interfaceorg.palladiosimulator.commons.designpatterns.IAbstractObservable<IProbeListener>
-
removeObserver
public void removeObserver(IProbeListener observer)
- Specified by:
removeObserverin interfaceorg.palladiosimulator.commons.designpatterns.IAbstractObservable<IProbeListener>
-
getMetricDesciption
public org.palladiosimulator.metricspec.MetricDescription getMetricDesciption()
- Specified by:
getMetricDesciptionin interfaceorg.palladiosimulator.metricspec.metricentity.IMetricEntity
-
isCompatibleWith
public boolean isCompatibleWith(org.palladiosimulator.metricspec.MetricDescription other)
- Specified by:
isCompatibleWithin interfaceorg.palladiosimulator.metricspec.metricentity.IMetricEntity
-
-