import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.opendaylight.controller.sal.core.ComponentActivatorAbstractBase;
+import org.opendaylight.controller.sal.inventory.IInventoryService;
import org.opendaylight.controller.sal.inventory.IListenInventoryUpdates;
public class Activator extends ComponentActivatorAbstractBase {
protected static final Logger logger = LoggerFactory
.getLogger(Activator.class);
- /**
- * Function called when the activator starts just after some
- * initializations are done by the
- * ComponentActivatorAbstractBase.
- *
- */
- public void init() {
- }
-
- /**
- * Function called when the activator stops just before the
- * cleanup done by ComponentActivatorAbstractBase
- *
- */
- public void destroy() {
- }
/**
* Method which tells how many Global implementations are
* @return The list of implementations the bundle will support,
* in Global version
*/
+ @Override
protected Object[] getGlobalImplementations() {
Object[] res = { ConnectionManager.class };
return res;
* @param imp implementation to be configured
* @param containerName container on which the configuration happens
*/
+ @Override
protected void configureGlobalInstance(Component c, Object imp) {
if (imp.equals(ConnectionManager.class)) {
Dictionary<String, Object> props = new Hashtable<String, Object>();
c.add(createServiceDependency().setService(IConnectionService.class)
.setCallbacks("setConnectionService", "unsetConnectionService")
.setRequired(true));
+ c.add(createServiceDependency().setService(IInventoryService.class, "(scope=Global)")
+ .setCallbacks("setInventoryService", "unsetInventoryService")
+ .setRequired(true));
}
}
}