|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.universAAL.middleware.bus.member.BusMember
org.universAAL.middleware.bus.member.Callee
org.universAAL.middleware.service.ServiceCallee
org.universAAL.support.utils.service.top.UtilActuatorCallee
public abstract class UtilActuatorCallee
This is an abstract class for those who want to use the typical services of an actuator (get status, set on, set off) over an ontological service. Classes extending this abstract class will be ServiceCallees which handle by default these 3 services. Those considering using UtilActuator could take advantage of this class if they want only to handle those 3 typical services profiles and no more.
Field Summary |
---|
Fields inherited from class org.universAAL.middleware.bus.member.BusMember |
---|
busResourceURI, owner, theBus |
Constructor Summary | |
---|---|
UtilActuatorCallee(ModuleContext context,
String namespace,
Actuator actuator)
Default constructor of the class. |
Method Summary | |
---|---|
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 . |
Methods inherited from class org.universAAL.middleware.service.ServiceCallee |
---|
addNewServiceProfiles, busDyingOut, communicationChannelBroken, getMyID, handleRequest, removeMatchingProfiles |
Methods inherited from class org.universAAL.middleware.bus.member.BusMember |
---|
close, getType, getURI |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
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 uAALnamespace
- 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 propertyMethod Detail |
---|
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 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()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |