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
,SupplementaryMeasurementAttachingProbe
,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 from
MetricEntity
. For example, a
probe taking the state of a passive resource would be typed by the
STATE_OF_PASSIVE_RESOURCE_METRIC
.
Because calculators have to observe such probes, this class also implements the
IAbstractObservable
interface. Calculators have to implement the
IProbeListener
interface to get informed about new probe measurements.-
Field Summary
Modifier and TypeFieldDescriptionprotected final org.palladiosimulator.metricspec.metricentity.IMetricEntity
Delegate object for implementing IMetricEntity. -
Constructor Summary
ModifierConstructorDescriptionprotected
Probe
(org.palladiosimulator.metricspec.MetricDescription metricDesciption) Default constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addObserver
(IProbeListener observer) org.palladiosimulator.metricspec.MetricDescription
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)
-
Field Details
-
metricEntityDelegate
protected final org.palladiosimulator.metricspec.metricentity.IMetricEntity metricEntityDelegateDelegate object for implementing IMetricEntity.
-
-
Constructor Details
-
Probe
protected Probe(org.palladiosimulator.metricspec.MetricDescription metricDesciption) Default constructor.- Parameters:
metricDesciption
- The metric of the measurements delivered by this probe.
-
-
Method Details
-
notifyMeasurementSourceListener
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
- Specified by:
addObserver
in interfaceorg.palladiosimulator.commons.designpatterns.IAbstractObservable<IProbeListener>
-
removeObserver
- 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
-