public abstract class UtilSensorCallee extends ServiceCallee
busResourceURI, owner, theBus
Constructor and Description |
---|
UtilSensorCallee(ModuleContext context,
String namespace,
Sensor sensor)
Default constructor of the class.
|
Modifier and Type | Method and Description |
---|---|
abstract boolean |
executeGet()
When a GET STATUS service request is received, this method is called
automatically.
|
ServiceResponse |
handleCall(ServiceCall call)
The actual service method of the
ServiceCallee . |
addNewServiceProfiles, addNewServiceProfiles, busDyingOut, communicationChannelBroken, getMyID, handleRequest, removeMatchingProfiles
close, getComment, getLabel, getType, getURI, setComment, setLabel
public UtilSensorCallee(ModuleContext context, String namespace, Sensor sensor) throws InvalidOntologyUtilException
BE CAREFUL: This will only work with sensors that have StatusValue as HAS_VALUE property. Others, like DimmerSensor, will throw an exception.
context
- The Module Context of universAALnamespace
- The namespace of your server, ending with the character #sensor
- The ontology instance of the sensor you are controlling. The
more properties it has set, the better.InvalidOntologyUtilException
- when an sensor is passed that is does not have StatusValue as
type restriction of its HAS_VALUE property.public ServiceResponse handleCall(ServiceCall call)
ServiceCallee
ServiceCallee
. It is called
by the bus whenever there is a call that need to be serviced by this
ServiceCallee
.handleCall
in class ServiceCallee
call
- the call that needs to be serviced.public abstract boolean executeGet()
Copyright © 2018 universAAL Consortium. All rights reserved.