X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fprotocol_plugins%2Fopenflow%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fprotocol_plugin%2Fopenflow%2Finternal%2FActivator.java;h=a93a8b7243cede7e2d81d212160dbe7a97806539;hb=refs%2Fchanges%2F17%2F417%2F1;hp=26471a7f754247c9b68d7845550ee382aabfa3b5;hpb=a1f02e35be4dff06e523d3aeb05a7b9e1ca91a07;p=controller.git diff --git a/opendaylight/protocol_plugins/openflow/src/main/java/org/opendaylight/controller/protocol_plugin/openflow/internal/Activator.java b/opendaylight/protocol_plugins/openflow/src/main/java/org/opendaylight/controller/protocol_plugin/openflow/internal/Activator.java index 26471a7f75..a93a8b7243 100644 --- a/opendaylight/protocol_plugins/openflow/src/main/java/org/opendaylight/controller/protocol_plugin/openflow/internal/Activator.java +++ b/opendaylight/protocol_plugins/openflow/src/main/java/org/opendaylight/controller/protocol_plugin/openflow/internal/Activator.java @@ -14,7 +14,9 @@ import java.util.Hashtable; import org.apache.felix.dm.Component; import org.opendaylight.controller.protocol_plugin.openflow.IDataPacketListen; import org.opendaylight.controller.protocol_plugin.openflow.IDataPacketMux; +import org.opendaylight.controller.protocol_plugin.openflow.IDiscoveryListener; import org.opendaylight.controller.protocol_plugin.openflow.IFlowProgrammerNotifier; +import org.opendaylight.controller.protocol_plugin.openflow.IInventoryProvider; import org.opendaylight.controller.protocol_plugin.openflow.IInventoryShimExternalListener; import org.opendaylight.controller.protocol_plugin.openflow.IInventoryShimInternalListener; import org.opendaylight.controller.protocol_plugin.openflow.IOFStatisticsManager; @@ -28,7 +30,6 @@ import org.opendaylight.controller.protocol_plugin.openflow.core.internal.Contro import org.opendaylight.controller.sal.core.ComponentActivatorAbstractBase; import org.opendaylight.controller.sal.core.IContainerListener; import org.opendaylight.controller.sal.core.Node; -import org.opendaylight.controller.sal.discovery.IDiscoveryService; import org.opendaylight.controller.sal.flowprogrammer.IPluginInFlowProgrammerService; import org.opendaylight.controller.sal.flowprogrammer.IPluginOutFlowProgrammerService; import org.opendaylight.controller.sal.inventory.IPluginInInventoryService; @@ -44,8 +45,8 @@ import org.slf4j.LoggerFactory; /** * Openflow protocol plugin Activator - * - * + * + * */ public class Activator extends ComponentActivatorAbstractBase { protected static final Logger logger = LoggerFactory @@ -54,7 +55,7 @@ public class Activator extends ComponentActivatorAbstractBase { /** * Function called when the activator starts just after some initializations * are done by the ComponentActivatorAbstractBase. - * + * */ public void init() { } @@ -62,7 +63,7 @@ public class Activator extends ComponentActivatorAbstractBase { /** * Function called when the activator stops just before the cleanup done by * ComponentActivatorAbstractBase - * + * */ public void destroy() { } @@ -70,8 +71,8 @@ public class Activator extends ComponentActivatorAbstractBase { /** * Function that is used to communicate to dependency manager the list of * known implementations for services inside a container - * - * + * + * * @return An array containing all the CLASS objects that will be * instantiated in order to get an fully working implementation * Object @@ -86,7 +87,7 @@ public class Activator extends ComponentActivatorAbstractBase { /** * Function that is called when configuration of the dependencies is * required. - * + * * @param c * dependency manager Component object, used for configuring the * dependencies exported and imported @@ -121,9 +122,8 @@ public class Activator extends ComponentActivatorAbstractBase { // export the service c.setInterface( new String[] { IPluginInInventoryService.class.getName(), - IStatisticsListener.class.getName(), - IInventoryShimInternalListener.class.getName() }, - null); + IInventoryShimInternalListener.class.getName(), + IInventoryProvider.class.getName() }, null); // Now lets add a service dependency to make sure the // provider of service exists @@ -194,8 +194,8 @@ public class Activator extends ComponentActivatorAbstractBase { /** * Function that is used to communicate to dependency manager the list of * known implementations for services that are container independent. - * - * + * + * * @return An array containing all the CLASS objects that will be * instantiated in order to get an fully working implementation * Object @@ -211,7 +211,7 @@ public class Activator extends ComponentActivatorAbstractBase { /** * Function that is called when configuration of the dependencies is * required. - * + * * @param c * dependency manager Component object, used for configuring the * dependencies exported and imported @@ -238,7 +238,9 @@ public class Activator extends ComponentActivatorAbstractBase { new String[] { IPluginInFlowProgrammerService.class.getName(), IMessageListener.class.getName(), - IContainerListener.class.getName() }, props); + IContainerListener.class.getName(), + IInventoryShimExternalListener.class.getName() }, + props); c.add(createServiceDependency() .setService(IController.class, "(name=Controller)") @@ -298,16 +300,16 @@ public class Activator extends ComponentActivatorAbstractBase { .setRequired(true)); c.add(createContainerServiceDependency( GlobalConstants.DEFAULT.toString()) - .setService(IPluginInInventoryService.class) - .setCallbacks("setPluginInInventoryService", - "unsetPluginInInventoryService").setRequired(true)); + .setService(IInventoryProvider.class) + .setCallbacks("setInventoryProvider", + "unsetInventoryProvider").setRequired(true)); c.add(createServiceDependency().setService(IDataPacketMux.class) .setCallbacks("setIDataPacketMux", "unsetIDataPacketMux") .setRequired(true)); c.add(createServiceDependency() - .setService(IDiscoveryService.class) - .setCallbacks("setDiscoveryService", - "unsetDiscoveryService").setRequired(true)); + .setService(IDiscoveryListener.class) + .setCallbacks("setDiscoveryListener", + "unsetDiscoveryListener").setRequired(true)); } // DataPacket mux/demux services, which is teh actual engine @@ -334,8 +336,8 @@ public class Activator extends ComponentActivatorAbstractBase { } if (imp.equals(InventoryServiceShim.class)) { - c.setInterface(new String[] { IContainerListener.class.getName() }, - null); + c.setInterface(new String[] { IContainerListener.class.getName(), + IStatisticsListener.class.getName()}, null); c.add(createServiceDependency() .setService(IController.class, "(name=Controller)") @@ -354,10 +356,11 @@ public class Activator extends ComponentActivatorAbstractBase { } if (imp.equals(TopologyServiceShim.class)) { - c.setInterface(new String[] { IDiscoveryService.class.getName(), + c.setInterface(new String[] { IDiscoveryListener.class.getName(), IContainerListener.class.getName(), - IRefreshInternalProvider.class.getName() }, null); - c.add(createServiceDependency() + IRefreshInternalProvider.class.getName(), + IInventoryShimExternalListener.class.getName() }, null); + c.add(createServiceDependency() .setService(ITopologyServiceShimListener.class) .setCallbacks("setTopologyServiceShimListener", "unsetTopologyServiceShimListener")