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
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.-
Field Summary
Fields inherited from class org.palladiosimulator.probeframework.probes.EventProbe
eventSource
Fields inherited from class org.palladiosimulator.probeframework.probes.Probe
metricEntityDelegate
-
Constructor Summary
ConstructorDescriptionEventProbeList
(org.palladiosimulator.metricspec.MetricDescription metricSetDescription, EventProbe<?> eventProbe, List<TriggeredProbe> subsumedProbes) Default constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
newProbeMeasurementAvailable
(ProbeMeasurement measurement) Receives a probe measurement from the event probe (event source).protected void
Template method for registering observers to the event source.Methods inherited from class org.palladiosimulator.probeframework.probes.Probe
addObserver, getMetricDesciption, isCompatibleWith, notifyMeasurementSourceListener, removeObserver
-
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
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<?>>
-