Class MetricUpdater
- java.lang.Object
-
- bytemusketeers.heslingtonhustle.metrics.MetricUpdater
-
public class MetricUpdater extends java.lang.Object
TheMetricUpdater
provides a common controller to link a singleMetricController
andMetricListener
, by means of enabling the former to post updates to the latter- Author:
- ENG1 Team 23 (Cohort 3)
-
-
Field Summary
Fields Modifier and Type Field Description private MetricListener
metricListener
The recipient of theMetricController
updates
-
Constructor Summary
Constructors Constructor Description MetricUpdater(MetricListener metricListener)
Instantiates a newMetricUpdater
to provide updates to aMetricListener
on the transient states of aMetricController
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
sendUpdate(MetricController.Metric metric, java.lang.String value)
Sends an update of a singleMetricController.Metric
to the registeredMetricListener
-
-
-
Field Detail
-
metricListener
private final MetricListener metricListener
The recipient of theMetricController
updates
-
-
Constructor Detail
-
MetricUpdater
public MetricUpdater(MetricListener metricListener)
Instantiates a newMetricUpdater
to provide updates to aMetricListener
on the transient states of aMetricController
- Parameters:
metricListener
- The data-recipientMetricListener
-
-
Method Detail
-
sendUpdate
public void sendUpdate(MetricController.Metric metric, java.lang.String value)
Sends an update of a singleMetricController.Metric
to the registeredMetricListener
- See Also:
metricListener
-
-