Package jmri.jmrix.rps
Class Distributor
- java.lang.Object
-
- jmri.jmrix.rps.Distributor
-
public class Distributor extends java.lang.Object
Distributes Readings and the Measurements calculated from them.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
Distributor.ForwardMeasurement
Forward the Measurement from the Swing thread.(package private) static class
Distributor.ForwardReading
Forward the Reading from the Swing thread.
-
Constructor Summary
Constructors Constructor Description Distributor()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addMeasurementListener(MeasurementListener l)
Request being informed when a new Measurement is available.void
addReadingListener(ReadingListener l)
Request being informed when a new Reading is available.static Distributor
instance()
void
removeMeasurementListener(MeasurementListener l)
Request to no longer be informed when new Measurements arrive.void
removeReadingListener(ReadingListener l)
Request to no longer be informed when new Readings arrive.void
submitMeasurement(Measurement s)
Invoked when a new Measurement is created.void
submitReading(Reading s)
Invoked when a new Reading is created.
-
-
-
Constructor Detail
-
Distributor
public Distributor()
-
-
Method Detail
-
addReadingListener
public void addReadingListener(ReadingListener l)
Request being informed when a new Reading is available.- Parameters:
l
- the reading listener to add.
-
removeReadingListener
public void removeReadingListener(ReadingListener l)
Request to no longer be informed when new Readings arrive.- Parameters:
l
- the reading listener to remove.
-
submitReading
public void submitReading(Reading s)
Invoked when a new Reading is created.- Parameters:
s
- the reading.
-
addMeasurementListener
public void addMeasurementListener(MeasurementListener l)
Request being informed when a new Measurement is available.- Parameters:
l
- the listener to add.
-
removeMeasurementListener
public void removeMeasurementListener(MeasurementListener l)
Request to no longer be informed when new Measurements arrive.- Parameters:
l
- the listener to remove.
-
submitMeasurement
public void submitMeasurement(Measurement s)
Invoked when a new Measurement is created.- Parameters:
s
- the measurement.
-
instance
public static Distributor instance()
-
-