Class AbstractRecordingProbeFrameworkListenerDecorator

java.lang.Object
org.palladiosimulator.simulizar.interpreter.listener.AbstractRecordingProbeFrameworkListenerDecorator
Direct Known Subclasses:
AggregatorsProbeFrameworkListenerDecorator, FeedThroughDecorator, MonitorRepositoryMapProbeFrameworkListenerDecorator, SlidingWindowProbeFrameWorkListenerDecorator, UtilizationProbeFrameworkListenerDecorator

public abstract class AbstractRecordingProbeFrameworkListenerDecorator extends Object
This class has to be implemented by all clients that wish to have additional measurements recorded, i.e., by all classes that make use of the org.palladiosimulator.simulizar.interpreter.listener.probeframework extension point.
  • Constructor Details

    • AbstractRecordingProbeFrameworkListenerDecorator

      public AbstractRecordingProbeFrameworkListenerDecorator()
  • Method Details

    • setProbeFrameworkListener

      public void setProbeFrameworkListener(AbstractProbeFrameworkListener probeFrameworkListener)
      Injects the probe framework listener that is decorated by this class.
      Parameters:
      probeFrameworkListener - The ProbeFrameworkListener used during the current simulation run.
    • registerMeasurements

      public void registerMeasurements()
      Registers additional measurements to be observed/stored by the probe framework listener.
      This method is called by the ProbeFrameworkListener in order to have additional measurements attached.
    • getProbeFrameworkListener

      protected AbstractProbeFrameworkListener getProbeFrameworkListener()
      Gets the current ProbeFrameworkListener instance.
      Returns:
      The current AbstractProbeFrameworkListener that has been passed to this instance via setProbeFrameworkListener(AbstractProbeFrameworkListener).
    • getProbeFrameworkContext

      protected org.palladiosimulator.probeframework.ProbeFrameworkContext getProbeFrameworkContext()
      Gets the current ProbeFrameworkContext.
      Returns:
      the ProbeFrameworkContext of the running simulation.
    • initializeRecorder

      protected org.palladiosimulator.recorderframework.IRecorder initializeRecorder(Map<String,Object> recorderConfigMap)
      Template method to instantiate and initialize a IRecorder implementation based on the SimuComConfig of the current SimuLizar run.
      Parameters:
      recorderConfigMap - A Map which contains the recorder configuration attributes.
      Returns:
      An IRecorder initialized with the given configuration.
      See Also:
    • instantiateRecorder

      protected org.palladiosimulator.recorderframework.IRecorder instantiateRecorder(de.uka.ipd.sdq.simucomframework.SimuComConfig config)
      Method to instantiate an IRecorder used for the recording of the measurements. This method is called within initializeRecorder(Map) to the initialization of the created recorder.
      Parameters:
      config - The SimuComConfig which contains the configuration of the current simulation run.
      Returns:
      This default implementation returns the result of
      RecorderExtensionHelper.instantiateRecorderImplementationForRecorder(config.getRecorderName()); .
    • createRecorderConfiguration

      protected org.palladiosimulator.recorderframework.config.IRecorderConfiguration createRecorderConfiguration(de.uka.ipd.sdq.simucomframework.SimuComConfig config, Map<String,Object> recorderConfigMap)
      Method to obtain an IRecorderConfiguration used for the recording of the measurements. This method is called within initializeRecorder(Map) to initialize the created recorder after it has been instantiated.
      Parameters:
      config - The SimuComConfig which contains the configuration of the current simulation run.
      recorderConfigMap - A Map with the configuration attributes.
      Returns:
      This default implementation returns the result of
      config.getRecorderConfigurationFactory().createRecorderConfiguration(recorderConfigMap); .
    • registerMeasurementsRecorder

      protected void registerMeasurementsRecorder(org.palladiosimulator.measurementframework.listener.MeasurementSource measurementSource, org.palladiosimulator.recorderframework.IRecorder recorder)
      Registers the given recorder at the given measurement source, i.e., adds it to the list of observers.
      Parameters:
      measurementSource - The MeasurementSource whose measurements shall be recorded.
      recorder - The IRecorder to record new measurements produced by the given source.
    • createRecorderConfigMapWithAcceptedMetricAndMeasuringPoint

      public static Map<String,Object> createRecorderConfigMapWithAcceptedMetricAndMeasuringPoint(org.palladiosimulator.metricspec.MetricDescription recorderAcceptedMetric, org.palladiosimulator.edp2.models.measuringpoint.MeasuringPoint measuringPoint)
      Convenience method to create a recorder configuration map which has the AbstractRecorderConfiguration.RECORDER_ACCEPTED_METRIC attribute (key) set to the given metric description and the AbstractRecorderConfiguration.MEASURING_POINT attribute (key) set to the given measuring point.
      Parameters:
      recorderAcceptedMetric - The MetricDescription to be put in the map.
      measuringPoint - The MeasuringPoint to be put in the map.
      Returns:
      A recorder configuration Map initialized as described.
      See Also: