public abstract class AbstractQueuedCallbackSink extends java.lang.Object implements VehicleDataSink
propagateMessage(VehicleMessage)
to add the actual logic for looping over the list of receivers and send them
new values.
New measurements are queued up and propagated to receivers in a separate
thread, to avoid blocking the original sender of the data.| Constructor and Description |
|---|
AbstractQueuedCallbackSink() |
| Modifier and Type | Method and Description |
|---|---|
void |
clearQueue() |
protected abstract void |
propagateMessage(VehicleMessage message) |
void |
receive(VehicleMessage message)
Receive a data point with a name, a value and a event value.
|
void |
stop()
Release any acquired resources and either stop sending measurements (if a
source) or stop expecting to receive them (if a sink).
|
public void stop()
VehicleDataSinkstop in interface VehicleDataSinkpublic void receive(VehicleMessage message) throws DataSinkException
VehicleDataSinkreceive in interface VehicleDataSinkmessage - The new measurement.DataSinkExceptionpublic void clearQueue()
protected abstract void propagateMessage(VehicleMessage message)