X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fswitchmanager%2Fimplementation%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fswitchmanager%2Finternal%2FActivator.java;h=002e06c0bf4fb3b84d3de4e2f6982552ed86a8b3;hb=633fd9012d8ff920283da437131b19d8cd3c2330;hp=b574269e450e46b2ee39b532208aadc00c024a4d;hpb=a60baada98048174f312e1f3b98757c9e0841e0c;p=controller.git diff --git a/opendaylight/switchmanager/implementation/src/main/java/org/opendaylight/controller/switchmanager/internal/Activator.java b/opendaylight/switchmanager/implementation/src/main/java/org/opendaylight/controller/switchmanager/internal/Activator.java index b574269e45..002e06c0bf 100644 --- a/opendaylight/switchmanager/implementation/src/main/java/org/opendaylight/controller/switchmanager/internal/Activator.java +++ b/opendaylight/switchmanager/implementation/src/main/java/org/opendaylight/controller/switchmanager/internal/Activator.java @@ -9,18 +9,14 @@ package org.opendaylight.controller.switchmanager.internal; -import java.util.Dictionary; -import java.util.HashSet; -import java.util.Hashtable; -import java.util.Set; - import org.apache.felix.dm.Component; -import org.opendaylight.controller.clustering.services.ICacheUpdateAware; import org.opendaylight.controller.clustering.services.IClusterContainerServices; import org.opendaylight.controller.configuration.IConfigurationContainerAware; +import org.opendaylight.controller.configuration.IConfigurationContainerService; import org.opendaylight.controller.sal.core.ComponentActivatorAbstractBase; import org.opendaylight.controller.sal.inventory.IInventoryService; import org.opendaylight.controller.sal.inventory.IListenInventoryUpdates; +import org.opendaylight.controller.statisticsmanager.IStatisticsManager; import org.opendaylight.controller.switchmanager.IInventoryListener; import org.opendaylight.controller.switchmanager.ISpanAware; import org.opendaylight.controller.switchmanager.ISwitchManager; @@ -37,26 +33,6 @@ 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. - * - */ - @Override - public void init() { - - } - - /** - * Function called when the activator stops just before the - * cleanup done by ComponentActivatorAbstractBase - * - */ - @Override - public void destroy() { - - } /** * Function that is used to communicate to dependency manager the @@ -89,16 +65,11 @@ public class Activator extends ComponentActivatorAbstractBase { @Override public void configureInstance(Component c, Object imp, String containerName) { if (imp.equals(SwitchManager.class)) { - Dictionary> props = new Hashtable>(); - Set propSet = new HashSet(); - propSet.add("switchmanager.configSaveEvent"); - props.put("cachenames", propSet); // export the service c.setInterface(new String[] { IListenInventoryUpdates.class.getName(), ISwitchManager.class.getName(), - ICacheUpdateAware.class.getName(), - IConfigurationContainerAware.class.getName() }, props); + IConfigurationContainerAware.class.getName() }, null); // Now lets add a service dependency to make sure the // provider of service exists @@ -106,6 +77,10 @@ public class Activator extends ComponentActivatorAbstractBase { IInventoryService.class).setCallbacks( "setInventoryService", "unsetInventoryService") .setRequired(false)); + c.add(createContainerServiceDependency(containerName).setService( + IStatisticsManager.class).setCallbacks( + "setStatisticsManager", "unsetStatisticsManager") + .setRequired(false)); c.add(createContainerServiceDependency(containerName).setService( ISwitchManagerAware.class).setCallbacks( "setSwitchManagerAware", "unsetSwitchManagerAware") @@ -121,6 +96,10 @@ public class Activator extends ComponentActivatorAbstractBase { IClusterContainerServices.class).setCallbacks( "setClusterContainerService", "unsetClusterContainerService").setRequired(true)); + c.add(createContainerServiceDependency(containerName).setService( + IConfigurationContainerService.class).setCallbacks( + "setConfigurationContainerService", + "unsetConfigurationContainerService").setRequired(true)); } }