org.universAAL.hw.exporter.zigbee.ha.devices.listeners
Class PresenceDetectorListener

Package class diagram package PresenceDetectorListener
java.lang.Object
  extended by org.universAAL.hw.exporter.zigbee.ha.devices.listeners.ExporterListener
      extended by org.universAAL.hw.exporter.zigbee.ha.devices.listeners.PresenceDetectorListener
All Implemented Interfaces:
EventListener, org.osgi.framework.ServiceListener

public class PresenceDetectorListener
extends ExporterListener

OSGi Service Listener that looks for a specific service published by the abstraction layer and creates and updates the appropriate exporter callee.

Author:
alfiva

Field Summary
 
Fields inherited from class org.universAAL.hw.exporter.zigbee.ha.devices.listeners.ExporterListener
context, discoveryLock, filter, setOfDevices
 
Constructor Summary
PresenceDetectorListener(org.osgi.framework.BundleContext context)
          Constructor to be used in the exporter.
 
Method Summary
protected  void registeruAALService(org.osgi.framework.ServiceReference sr)
          Registers a service reference as a new instance of exported device.
 void unregisteruAALService()
          Disconnects and removes all instantiated exported devices of this type.
protected  void unregisteruAALService(org.osgi.framework.ServiceReference sr)
          Disconnect a single instance of exported device.
 
Methods inherited from class org.universAAL.hw.exporter.zigbee.ha.devices.listeners.ExporterListener
serviceChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PresenceDetectorListener

public PresenceDetectorListener(org.osgi.framework.BundleContext context)
                         throws org.osgi.framework.InvalidSyntaxException
Constructor to be used in the exporter. Configures the listener and performs initial search.

Parameters:
context - The OSGi context
Throws:
org.osgi.framework.InvalidSyntaxException - If the service to listen defined in the class is not appropriate
Method Detail

registeruAALService

protected void registeruAALService(org.osgi.framework.ServiceReference sr)
Description copied from class: ExporterListener
Registers a service reference as a new instance of exported device.

Specified by:
registeruAALService in class ExporterListener
Parameters:
sr - The service reference identifying the instance to register.

unregisteruAALService

protected void unregisteruAALService(org.osgi.framework.ServiceReference sr)
Description copied from class: ExporterListener
Disconnect a single instance of exported device.

Specified by:
unregisteruAALService in class ExporterListener
Parameters:
sr - The service reference identifying the instance to disconnect.

unregisteruAALService

public void unregisteruAALService()
Description copied from class: ExporterListener
Disconnects and removes all instantiated exported devices of this type.

Specified by:
unregisteruAALService in class ExporterListener


Copyright © 2014 universAAL Consortium. All Rights Reserved.