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
FieldsModifier and TypeFieldDescriptionprotected final org.palladiosimulator.metricspec.metricentity.IMetricEntityDelegate object for implementing IMetricEntity. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedProbe(org.palladiosimulator.metricspec.MetricDescription metricDesciption) Default constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddObserver(IProbeListener observer) org.palladiosimulator.metricspec.MetricDescriptionbooleanisCompatibleWith(org.palladiosimulator.metricspec.MetricDescription other) protected voidnotifyMeasurementSourceListener(ProbeMeasurement newMeasurement) Notifies all registered observers about a new probe measurement.voidremoveObserver(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:
addObserverin interfaceorg.palladiosimulator.commons.designpatterns.IAbstractObservable<IProbeListener>
-
removeObserver
- 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
-