org.universAAL.hw.exporter.zigbee.ha.devices.listeners
Class TemperatureSensorListener
java.lang.Object
org.universAAL.hw.exporter.zigbee.ha.devices.listeners.ExporterListener
org.universAAL.hw.exporter.zigbee.ha.devices.listeners.TemperatureSensorListener
- All Implemented Interfaces:
- EventListener, org.osgi.framework.ServiceListener
public class TemperatureSensorListener
- 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
Constructor Summary |
TemperatureSensorListener(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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TemperatureSensorListener
public TemperatureSensorListener(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
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.