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 classDistributor.ForwardMeasurementForward the Measurement from the Swing thread.(package private) static classDistributor.ForwardReadingForward 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 voidaddMeasurementListener(MeasurementListener l)Request being informed when a new Measurement is available.voidaddReadingListener(ReadingListener l)Request being informed when a new Reading is available.static Distributorinstance()voidremoveMeasurementListener(MeasurementListener l)Request to no longer be informed when new Measurements arrive.voidremoveReadingListener(ReadingListener l)Request to no longer be informed when new Readings arrive.voidsubmitMeasurement(Measurement s)Invoked when a new Measurement is created.voidsubmitReading(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()
-
-