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 theIAbstractObservable
interface. Calculators have to implement theIProbeListener
interface to get informed about new probe measurements.
-
-
Field Summary
Fields Modifier and Type Field Description protected org.palladiosimulator.metricspec.metricentity.IMetricEntity
metricEntityDelegate
Delegate object for implementing IMetricEntity.
-
Constructor Summary
Constructors Modifier Constructor Description protected
Probe(org.palladiosimulator.metricspec.MetricDescription metricDesciption)
Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addObserver(IProbeListener observer)
org.palladiosimulator.metricspec.MetricDescription
getMetricDesciption()
boolean
isCompatibleWith(org.palladiosimulator.metricspec.MetricDescription other)
protected void
notifyMeasurementSourceListener(ProbeMeasurement newMeasurement)
Notifies all registered observers about a new probe measurement.void
removeObserver(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:
addObserver
in interfaceorg.palladiosimulator.commons.designpatterns.IAbstractObservable<IProbeListener>
-
removeObserver
public void removeObserver(IProbeListener observer)
- Specified by:
removeObserver
in interfaceorg.palladiosimulator.commons.designpatterns.IAbstractObservable<IProbeListener>
-
getMetricDesciption
public org.palladiosimulator.metricspec.MetricDescription getMetricDesciption()
- Specified by:
getMetricDesciption
in interfaceorg.palladiosimulator.metricspec.metricentity.IMetricEntity
-
isCompatibleWith
public boolean isCompatibleWith(org.palladiosimulator.metricspec.MetricDescription other)
- Specified by:
isCompatibleWith
in interfaceorg.palladiosimulator.metricspec.metricentity.IMetricEntity
-
-