public interface SensorAdapter extends StopableObject
SensorAdapter
.SensorAdapter
needs to implement to be used in common with the
reachability project. Besides this interface, a SensorAdapter
needs to implement the interface
StopableObject
as well.Modifier and Type | Method and Description |
---|---|
void |
connect()
Connects the sensor to its data source, for it'll be able to provide new sensor data in an internal data format
via the ActiveMQ.
|
ReasonerDimension |
getDataDimension()
Provides the context dimension of the sensors data as
ReasonerDimension . |
java.lang.String |
getRequestTopicName()
Provides the name of the request topic for ActiveMQ communication, if the
SensorAdapter is connected to
its data source via the ActiveMQ and the data source needs requests to supply data, otherwise null . |
java.lang.String |
getResultTopicName()
Provides the name of the result topic for ActiveMQ communication, if the
SensorAdapter is connected to
its data source via the ActiveMQ, otherwise null . |
SensorData |
getSensorOutput()
Requests the last measured sensor data from the
SensorAdapter as SensorData . |
void |
setSilent(boolean state)
Sets the silent state.
|
void |
start()
A
SensorAdapter extends the class Thread . |
boolean |
stopped()
Determines if the
SensorAdapter has stopped working. |
isActive, shutDown
void connect()
SensorData getSensorOutput()
SensorAdapter
as SensorData
.SensorData
object.java.lang.String getRequestTopicName()
SensorAdapter
is connected to
its data source via the ActiveMQ and the data source needs requests to supply data, otherwise null
.SensorAdapter
, if it's connected via ActiveMQ,
otherwise null
.java.lang.String getResultTopicName()
SensorAdapter
is connected to
its data source via the ActiveMQ, otherwise null
.SensorAdapter
, if it's connected via ActiveMQ,
otherwise null
.ReasonerDimension getDataDimension()
ReasonerDimension
.ReasonerDimension
of the sensors data.void start()
SensorAdapter
extends the class Thread
. To make the Thread.start()
method visible, it
needs to be included to this interface.boolean stopped()
SensorAdapter
has stopped working.true
if the SensorAdapter
has stopped working, otherwise false
.void setSilent(boolean state)
true
, the worker won't publish his informations on the
internal data topic.state
- The current state of silence as Boolean
.