public abstract class ExporterListener extends Object implements org.osgi.framework.ServiceListener
Modifier and Type | Field and Description |
---|---|
protected org.osgi.framework.BundleContext |
context |
protected Object |
discoveryLock |
protected static String |
filter |
protected HashMap<org.osgi.framework.ServiceReference,ServiceCallee> |
setOfDevices |
Constructor and Description |
---|
ExporterListener(org.osgi.framework.BundleContext context)
Constructor to be used in the exporter.
|
Modifier and Type | Method and Description |
---|---|
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.
|
protected static String filter
protected Object discoveryLock
protected org.osgi.framework.BundleContext context
protected HashMap<org.osgi.framework.ServiceReference,ServiceCallee> setOfDevices
public ExporterListener(org.osgi.framework.BundleContext context) throws org.osgi.framework.InvalidSyntaxException
context
- The OSGi contextorg.osgi.framework.InvalidSyntaxException
- If the service to listen defined in the class is not
appropriatepublic void serviceChanged(org.osgi.framework.ServiceEvent event)
serviceChanged
in interface org.osgi.framework.ServiceListener
protected abstract void registeruAALService(org.osgi.framework.ServiceReference sr)
sr
- The service reference identifying the instance to register.protected abstract void unregisteruAALService(org.osgi.framework.ServiceReference sr)
sr
- The service reference identifying the instance to disconnect.public abstract void unregisteruAALService()
Copyright © 2015 universAAL Consortium. All Rights Reserved.