org.universAAL.hw.exporter.zigbee.ha.devices.listeners
Class ExporterListener
java.lang.Object
org.universAAL.hw.exporter.zigbee.ha.devices.listeners.ExporterListener
- All Implemented Interfaces:
- EventListener, org.osgi.framework.ServiceListener
- Direct Known Subclasses:
- DimmerLightListener, IASZoneListener, OccupancySensorListener, OnOffLightListener, PresenceDetectorListener, TemperatureSensorListener
public abstract class ExporterListener
- extends Object
- implements org.osgi.framework.ServiceListener
Constructor Summary |
ExporterListener(org.osgi.framework.BundleContext context)
Constructor to be used in the exporter. |
Method Summary |
protected abstract void |
registeruAALService(org.osgi.framework.ServiceReference sr)
Registers a service reference as a new instance of exported device. |
void |
serviceChanged(org.osgi.framework.ServiceEvent event)
|
abstract void |
unregisteruAALService()
Disconnects and removes all instantiated exported devices of this type. |
protected abstract void |
unregisteruAALService(org.osgi.framework.ServiceReference sr)
Disconnect a single instance of exported device. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
filter
protected static String filter
discoveryLock
protected Object discoveryLock
context
protected org.osgi.framework.BundleContext context
setOfDevices
protected HashMap<org.osgi.framework.ServiceReference,ServiceCallee> setOfDevices
ExporterListener
public ExporterListener(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
serviceChanged
public void serviceChanged(org.osgi.framework.ServiceEvent event)
- Specified by:
serviceChanged
in interface org.osgi.framework.ServiceListener
registeruAALService
protected abstract void registeruAALService(org.osgi.framework.ServiceReference sr)
- Registers a service reference as a new instance of exported device.
- Parameters:
sr
- The service reference identifying the instance to register.
unregisteruAALService
protected abstract void unregisteruAALService(org.osgi.framework.ServiceReference sr)
- Disconnect a single instance of exported device.
- Parameters:
sr
- The service reference identifying the instance to disconnect.
unregisteruAALService
public abstract void unregisteruAALService()
- Disconnects and removes all instantiated exported devices of this type.
Copyright © 2014 universAAL Consortium. All Rights Reserved.