public class LightingConsumer extends ContextSubscriber
busResourceURI, owner, theBus
Modifier and Type | Method and Description |
---|---|
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 LightSource[] |
getControlledLamps() |
static ServiceRequest |
getGetLampsLocationRequest(String lampURI) |
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, removeMatchingRegParams
close, getComment, getLabel, getType, getURI, setComment, setLabel
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 getGetLampsLocationRequest(String lampURI)
public static ServiceRequest getAllLampsRequest()
public static LightSource[] getControlledLamps()
public static boolean turnOff(String lampURI)
public static boolean turnOn(String lampURI)
public void handleContextEvent(ContextEvent event)
ContextSubscriber
handleContextEvent
in class ContextSubscriber
event
- The Context Event that matched the registered Patternspublic void communicationChannelBroken()
ContextSubscriber
communicationChannelBroken
in class ContextSubscriber
Copyright © 2018 universAAL Consortium. All rights reserved.