X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fprotocol_plugins%2Fopenflow%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fprotocol_plugin%2Fopenflow%2Finternal%2FInventoryService.java;h=7a2ace5bae6008e0262b06755d1e70bec668219f;hp=8af9b3ea058d894bf544c960bedf019256924721;hb=827a49935d5abeebc6fde702be427f0c939d264e;hpb=0f846fcbc207a4213ac133e1d08a305fc72168ba diff --git a/opendaylight/protocol_plugins/openflow/src/main/java/org/opendaylight/controller/protocol_plugin/openflow/internal/InventoryService.java b/opendaylight/protocol_plugins/openflow/src/main/java/org/opendaylight/controller/protocol_plugin/openflow/internal/InventoryService.java index 8af9b3ea05..7a2ace5bae 100644 --- a/opendaylight/protocol_plugins/openflow/src/main/java/org/opendaylight/controller/protocol_plugin/openflow/internal/InventoryService.java +++ b/opendaylight/protocol_plugins/openflow/src/main/java/org/opendaylight/controller/protocol_plugin/openflow/internal/InventoryService.java @@ -19,6 +19,7 @@ import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; import org.apache.felix.dm.Component; +import org.opendaylight.controller.protocol_plugin.openflow.IInventoryProvider; import org.opendaylight.controller.protocol_plugin.openflow.IInventoryShimInternalListener; import org.opendaylight.controller.protocol_plugin.openflow.core.IController; import org.opendaylight.controller.protocol_plugin.openflow.core.ISwitch; @@ -44,11 +45,11 @@ import org.slf4j.LoggerFactory; * container of the network. Each instance gets container specific inventory * events from InventoryServiceShim. It interacts with SAL to pass inventory * data to the upper application. - * - * + * + * */ public class InventoryService implements IInventoryShimInternalListener, - IPluginInInventoryService { + IPluginInInventoryService, IInventoryProvider { protected static final Logger logger = LoggerFactory .getLogger(InventoryService.class); private Set pluginOutInventoryServices = Collections @@ -71,7 +72,7 @@ public class InventoryService implements IInventoryShimInternalListener, /** * Function called by the dependency manager when all the required * dependencies are satisfied - * + * */ @SuppressWarnings("rawtypes") void init(Component c) { @@ -92,7 +93,7 @@ public class InventoryService implements IInventoryShimInternalListener, * Function called by the dependency manager when at least one dependency * become unsatisfied or when the component is shutting down because for * example bundle is being stopped. - * + * */ void destroy() { logger.trace("DESTROY called!"); @@ -101,7 +102,7 @@ public class InventoryService implements IInventoryShimInternalListener, /** * Function called by dependency manager after "init ()" is called and after * the services provided by the class are registered in the service registry - * + * */ void start() { logger.trace("START called!"); @@ -111,7 +112,7 @@ public class InventoryService implements IInventoryShimInternalListener, * Function called by the dependency manager before the services exported by * the component are unregistered, this will be followed by a "destroy ()" * calls - * + * */ void stop() { logger.trace("STOP called!"); @@ -299,7 +300,7 @@ public class InventoryService implements IInventoryShimInternalListener, } } } - + private void updateNode(Node node, Set properties) { logger.trace("{} updated, props: {}", node, properties); if (nodeProps == null || !nodeProps.containsKey(node) || @@ -315,7 +316,7 @@ public class InventoryService implements IInventoryShimInternalListener, Property currentProperty = propertyMap.get(name); if (!property.equals(currentProperty)) { propertyMap.put(name, property); - newProperties.add(property); + newProperties.add(property); } }