public class UserSink extends java.lang.Object implements VehicleDataSink
VehicleManager
to pass measurement updates from a user's
data sources back to the VehicleService, so it can propagate them to all
OpenXC apps.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
UNABLE_TO_SEND_MESSAGE_TO_REMOTE_SERVICE |
Constructor and Description |
---|
UserSink(VehicleServiceInterface service)
Registers a measurement listener with the remote service.
|
Modifier and Type | Method and Description |
---|---|
void |
receive(VehicleMessage measurement)
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).
|
java.lang.String |
toString() |
public static final java.lang.String UNABLE_TO_SEND_MESSAGE_TO_REMOTE_SERVICE
public UserSink(VehicleServiceInterface service)
public void receive(VehicleMessage measurement)
VehicleDataSink
receive
in interface VehicleDataSink
measurement
- The new measurement.public java.lang.String toString()
toString
in class java.lang.Object
public void stop()
VehicleDataSink
stop
in interface VehicleDataSink