Class EventProbeList
- java.lang.Object
-
- org.palladiosimulator.probeframework.probes.Probe
-
- org.palladiosimulator.probeframework.probes.EventProbe<EventProbe<?>>
-
- org.palladiosimulator.probeframework.probes.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 theIProbeListener
interface. Once a new measurement arrives (via the call-back methodnewProbeMeasurementAvailable
), 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 invokingdoMeasure
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.
-
-
Field Summary
-
Fields inherited from class org.palladiosimulator.probeframework.probes.EventProbe
eventSource
-
Fields inherited from class org.palladiosimulator.probeframework.probes.Probe
metricEntityDelegate
-
-
Constructor Summary
Constructors Constructor Description EventProbeList(org.palladiosimulator.metricspec.MetricDescription metricSetDescription, EventProbe<?> eventProbe, List<TriggeredProbe> subsumedProbes)
Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
newProbeMeasurementAvailable(ProbeMeasurement measurement)
Receives a probe measurement from the event probe (event source).protected void
registerListener()
Template method for registering observers to the event source.-
Methods inherited from class org.palladiosimulator.probeframework.probes.Probe
addObserver, getMetricDesciption, isCompatibleWith, notifyMeasurementSourceListener, removeObserver
-
-
-
-
Constructor Detail
-
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 Detail
-
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 interfaceIProbeListener
- Parameters:
measurement
- The probe measurement.
-
registerListener
protected void registerListener()
Template method for registering observers to the event source.- Specified by:
registerListener
in classEventProbe<EventProbe<?>>
-
-