Class 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 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 Detail

      • metricEntityDelegate

        protected final org.palladiosimulator.metricspec.metricentity.IMetricEntity metricEntityDelegate
        Delegate object for implementing IMetricEntity.
    • Constructor Detail

      • Probe

        protected Probe​(org.palladiosimulator.metricspec.MetricDescription metricDesciption)
        Default constructor.
        Parameters:
        metricDesciption - The metric of the measurements delivered by this probe.
    • 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 interface org.palladiosimulator.commons.designpatterns.IAbstractObservable<IProbeListener>
      • removeObserver

        public void removeObserver​(IProbeListener observer)
        Specified by:
        removeObserver in interface org.palladiosimulator.commons.designpatterns.IAbstractObservable<IProbeListener>
      • getMetricDesciption

        public org.palladiosimulator.metricspec.MetricDescription getMetricDesciption()
        Specified by:
        getMetricDesciption in interface org.palladiosimulator.metricspec.metricentity.IMetricEntity
      • isCompatibleWith

        public boolean isCompatibleWith​(org.palladiosimulator.metricspec.MetricDescription other)
        Specified by:
        isCompatibleWith in interface org.palladiosimulator.metricspec.metricentity.IMetricEntity