config subsystem integration - BUG 541
[openflowplugin.git] / openflowplugin / src / main / java / org / opendaylight / yang / gen / v1 / urn / opendaylight / params / xml / ns / yang / openflow / common / config / impl / rev140326 / ConfigurableOpenFlowProviderModule.java
1 /**
2 * Generated file
3
4 * Generated from: yang module name: openflow-provider-impl  yang module local name: openflow-provider-impl
5 * Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
6 * Generated at: Wed Apr 02 16:59:36 PDT 2014
7 *
8 * Do not modify this file unless it is present under src/main directory
9 */
10 package org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.openflow.common.config.impl.rev140326;
11
12 import org.opendaylight.openflowplugin.openflow.md.core.sal.OpenflowPluginProvider;
13 import org.osgi.framework.BundleContext;
14
15 /**
16 *
17 */
18 public final class ConfigurableOpenFlowProviderModule extends org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.openflow.common.config.impl.rev140326.AbstractConfigurableOpenFlowProviderModule {
19     
20     private OpenflowPluginProvider pluginProvider;
21     private BundleContext bundleContext;
22     
23     /**
24      * @param identifier
25      * @param dependencyResolver
26      */
27     public ConfigurableOpenFlowProviderModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
28         super(identifier, dependencyResolver);
29     }
30
31     /**
32      * @param identifier
33      * @param dependencyResolver
34      * @param oldModule
35      * @param oldInstance
36      */
37     public ConfigurableOpenFlowProviderModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver,
38             ConfigurableOpenFlowProviderModule oldModule, java.lang.AutoCloseable oldInstance) {
39
40         super(identifier, dependencyResolver, oldModule, oldInstance);
41     }
42
43     @Override
44     protected void customValidation() {
45         // Add custom validation for module attributes here.
46     }
47
48     @Override
49     public java.lang.AutoCloseable createInstance() {
50         pluginProvider =  new OpenflowPluginProvider();
51         pluginProvider.setContext(bundleContext);
52         pluginProvider.setBroker(getBindingAwareBrokerDependency());
53         pluginProvider.setSwitchConnectionProviders(getOpenflowSwitchConnectionProviderDependency());
54         pluginProvider.registerProvider();
55         return pluginProvider;
56     }
57     
58     /**
59      * @param bundleContext the bundleContext to set, see {@link OpenflowPluginProvider#setContext(BundleContext)}
60      * 
61      * @deprecated we should avoid osgi specific stuff .. once, 
62      */
63     @Deprecated
64     public void setBundleContext(BundleContext bundleContext) {
65         this.bundleContext = bundleContext;
66     }
67 }