org.universAAL.samples.lighting.uiclient
Class LightingConsumer

Package class diagram package LightingConsumer
java.lang.Object
  extended by org.universAAL.middleware.bus.member.BusMember
      extended by org.universAAL.middleware.bus.member.Subscriber
          extended by org.universAAL.middleware.context.ContextSubscriber
              extended by org.universAAL.samples.lighting.uiclient.LightingConsumer

public class LightingConsumer
extends ContextSubscriber

Author:
amarinc

Field Summary
 
Fields inherited from class org.universAAL.middleware.bus.member.BusMember
busResourceURI, owner, theBus
 
Method Summary
 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)
           
 
Methods inherited from class org.universAAL.middleware.context.ContextSubscriber
addNewRegParams, busDyingOut, getAllProvisions, getMyID, handleEvent, removeMatchingRegParams
 
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
 

Method Detail

getContextSubscriptionParams

public static ContextEventPattern[] getContextSubscriptionParams()

turnOffRequest

public static ServiceRequest turnOffRequest(String lampURI)

turnOnRequest

public static ServiceRequest turnOnRequest(String lampURI)

dimRequest

public static ServiceRequest dimRequest(String lampURI,
                                        Integer percent)

getGetLampsLocationRequest

public static ServiceRequest getGetLampsLocationRequest(String lampURI)

getAllLampsRequest

public static ServiceRequest getAllLampsRequest()

getControlledLamps

public static LightSource[] getControlledLamps()

turnOff

public static boolean turnOff(String lampURI)

turnOn

public static boolean turnOn(String lampURI)

dimToValue

public static boolean dimToValue(String lampURI,
                                 Integer percent)

handleContextEvent

public void handleContextEvent(ContextEvent event)
Description copied from class: ContextSubscriber
Method to be called when an Event forwarded in the Context Bus matches one of the Patterns registered by this Subscriber.

Specified by:
handleContextEvent in class ContextSubscriber
Parameters:
event - The Context Event that matched the registered Patterns

communicationChannelBroken

public void communicationChannelBroken()
Description copied from class: ContextSubscriber
Method to be called when the communication of the Subsccriber with the Context Bus is lost.

Specified by:
communicationChannelBroken in class ContextSubscriber


Copyright © 2014 universAAL Consortium. All Rights Reserved.