public abstract class UtilActuatorCallee extends ServiceCallee
busResourceURI, owner, theBus
Constructor and Description |
---|
UtilActuatorCallee(ModuleContext context,
String namespace,
Actuator actuator)
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.
|
abstract boolean |
executeOff()
When a SET OFF service request is received, this method is called
automatically.
|
abstract boolean |
executeOn()
When a SET ON 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 UtilActuatorCallee(ModuleContext context, String namespace, Actuator actuator) throws InvalidOntologyUtilException
BE CAREFUL: This will only work with actuators that have StatusValue as HAS_VALUE property. Others, like DimmerActuator, will throw an exception.
context
- The Module Context of universAALnamespace
- The namespace of your server, ending with the character #actuator
- The ontology instance of the actuator you are controlling. The
more properties it has set, the better.InvalidOntologyUtilException
- when an actuator is passed that is does not have StatusValue
as type restriction of its HAS_VALUE propertypublic 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 executeOn()
true
if the actuator could be set to ONpublic abstract boolean executeOff()
true
if the actuator could be set to OFFpublic abstract boolean executeGet()
Copyright © 2018 universAAL Consortium. All rights reserved.