Bug 5061: Integrate BGPPeerModule with blueprint
[bgpcep.git] / bgp / rib-impl / src / main / java / org / opendaylight / controller / config / yang / bgp / rib / impl / BGPPeerModuleFactory.java
index 5c73a4089a164c7bebffbbf66047da414c315668..31db8eb7df1f36d69bc644d71990c85b70f7235d 100644 (file)
  */
 package org.opendaylight.controller.config.yang.bgp.rib.impl;
 
+import org.opendaylight.controller.config.api.DependencyResolver;
+import org.opendaylight.controller.config.api.DynamicMBeanWithInstance;
+import org.opendaylight.controller.config.spi.Module;
+import org.osgi.framework.BundleContext;
+
 /**
-*
-*/
+ *
+ */
+@Deprecated
 public class BGPPeerModuleFactory extends org.opendaylight.controller.config.yang.bgp.rib.impl.AbstractBGPPeerModuleFactory {
 
+    @Override
+    public Module createModule(final String instanceName, final DependencyResolver dependencyResolver, final BundleContext bundleContext) {
+        final BGPPeerModule module = (BGPPeerModule) super.createModule(instanceName, dependencyResolver, bundleContext);
+        module.setBundleContext(bundleContext);
+        return module;
+    }
+
+    @Override
+    public Module createModule(final String instanceName, final DependencyResolver dependencyResolver,
+            final DynamicMBeanWithInstance old, final BundleContext bundleContext) throws Exception {
+        final BGPPeerModule module = (BGPPeerModule)  super.createModule(instanceName, dependencyResolver, old, bundleContext);
+        module.setBundleContext(bundleContext);
+        return module;
+    }
+
 }