Class EventProbeList

All Implemented Interfaces:
org.palladiosimulator.commons.designpatterns.IAbstractObservable<IProbeListener>, org.palladiosimulator.metricspec.metricentity.IMetricEntity, IProbeListener

public class EventProbeList extends EventProbe<EventProbe<?>> implements IProbeListener
Event probe lists group a list of subsumed, triggered probes that are triggered as soon as an additional, dedicated event probe emits an event. Event probe lists can register themselves to this event probe because this class implements the IProbeListener interface. Once a new measurement arrives (via the call-back method newProbeMeasurementAvailable), event probe lists create a measurement tuple by creating a list with the new measurement plus the measurements from subsumed probes. These measurements are received by invoking doMeasure on each subsumed probe (that is possible since only triggered probes are subsumed). Finally, registered listeners (e.g., calculators) are informed about the newly available measurement tuple.
  • Constructor Details

    • EventProbeList

      public EventProbeList(org.palladiosimulator.metricspec.MetricDescription metricSetDescription, EventProbe<?> eventProbe, List<TriggeredProbe> subsumedProbes)
      Default constructor. Expects one event probe as well as the list of subsumed, triggered probes.
      Type Parameters:
      EventSourceType - The type of the event source .
      V - The value type of the basic measure.
      Q - The quantity type of the basic measure.
      Parameters:
      eventProbe - The event probe.
      subsumedProbes - The list of subsumed probes.
      metricSetDescription -
      Throws:
      IllegalArgumentException - If a subsumed probe is not a triggered probe.
  • Method Details

    • newProbeMeasurementAvailable

      public void newProbeMeasurementAvailable(ProbeMeasurement measurement)
      Receives a probe measurement from the event probe (event source). Calculates its measurement by additionally triggering subsumed probes. Finally, informs all its observers about the new measurement.
      Specified by:
      newProbeMeasurementAvailable in interface IProbeListener
      Parameters:
      measurement - The probe measurement.
    • registerListener

      protected void registerListener()
      Template method for registering observers to the event source.
      Specified by:
      registerListener in class EventProbe<EventProbe<?>>