
public class LightingConsumer extends ContextSubscriber
| Modifier and Type | Field and Description |
|---|---|
static ServiceCaller |
caller |
busResourceURI, owner, theBus| Constructor and Description |
|---|
LightingConsumer(ModuleContext context) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Unregisters the Subscriber from the bus.
|
void |
communicationChannelBroken()
Method to be called when the communication of the Subsccriber with the
Context Bus is lost.
|
static ServiceRequest |
dimRequest(String lampURI,
Integer percent) |
static boolean |
dimToValue(String lampURI,
Integer percent) |
static ServiceRequest |
getAllLampsRequest() |
static ContextEventPattern[] |
getContextSubscriptionParams() |
static Device[] |
getControlledLamps() |
void |
handleContextEvent(ContextEvent event)
Method to be called when an Event forwarded in the Context Bus matches
one of the Patterns registered by this Subscriber.
|
static boolean |
turnOff(String lampURI) |
static ServiceRequest |
turnOffRequest(String lampURI) |
static boolean |
turnOn(String lampURI) |
static ServiceRequest |
turnOnRequest(String lampURI) |
addNewRegParams, busDyingOut, getAllProvisions, getMyID, handleEvent, removeMatchingRegParamsgetComment, getLabel, getType, getURI, setComment, setLabelpublic static ServiceCaller caller
public LightingConsumer(ModuleContext context)
public static ContextEventPattern[] getContextSubscriptionParams()
public static ServiceRequest turnOffRequest(String lampURI)
public static ServiceRequest turnOnRequest(String lampURI)
public static ServiceRequest dimRequest(String lampURI, Integer percent)
public static ServiceRequest getAllLampsRequest()
public static Device[] getControlledLamps()
public static boolean turnOff(String lampURI)
public static boolean turnOn(String lampURI)
public void handleContextEvent(ContextEvent event)
ContextSubscriberhandleContextEvent in class ContextSubscriberevent - The Context Event that matched the registered Patternspublic void communicationChannelBroken()
ContextSubscribercommunicationChannelBroken in class ContextSubscriberCopyright © 2018 universAAL Consortium. All rights reserved.