public class ExampleAdapter extends Sensor implements SensorAdapter
SensorAdapter
to illustrate the basic sensor agent implementation.Constructor and Description |
---|
ExampleAdapter(ReasonerDimension dimension)
The constructor only delegates the supplied
ReasonerDimension ("example") to the constructor of the
abstract Sensor class. |
Modifier and Type | Method and Description |
---|---|
SensorData |
getSensorOutput()
Retrieves the current inhabitants stress level via ActiveMQ and returns it as
SensorData . |
static void |
main(java.lang.String[] args)
Main method which starts this
ExampleAdapter . |
connect, getDataDimension, getID, getLocalConf, getRequestTopic, getRequestTopicName, getResultTopic, getResultTopicName, getVersion, isActive, isSilent, loadDefaultsFromXMLResource, run, setDelay, setLocalConf, setRequestTopicName, setResultTopicName, setSilent, shutDown, stopped
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
connect, getDataDimension, getRequestTopicName, getResultTopicName, setSilent, start, stopped
isActive, shutDown
public ExampleAdapter(ReasonerDimension dimension)
ReasonerDimension
("example") to the constructor of the
abstract Sensor
class.Sensor
loads the local XML configuration from "/resource/sensor/ExampleAdapter.xml"
and opens all required ActiveMQ connections.dimension
- The ReasonerDimension
for which this sensor is configured.public final SensorData getSensorOutput()
SensorData
.getSensorOutput
in interface SensorAdapter
getSensorOutput
in class Sensor
SensorData
object.public static void main(java.lang.String[] args)
ExampleAdapter
.args
- The start arguments as array of String
.