Bug 762: Fixed bug in CsSnToXmlTest java.
[controller.git] / opendaylight / md-sal / sal-dom-broker / src / main / java / org / opendaylight / controller / config / yang / md / sal / dom / impl / DomBrokerImplModule.java
index 9a2a90445e0ad1f72d37fc11b4308b0a74452ae8..767785dbf13c1dac1231b46e2339f044ebe0cb97 100644 (file)
@@ -1,22 +1,18 @@
-/**
-* Generated file
-
-* Generated from: yang module name: opendaylight-sal-dom-broker-impl  yang module local name: dom-broker-impl
-* Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
-* Generated at: Wed Nov 20 17:04:41 CET 2013
-*
-* Do not modify this file unless it is present under src/main directory
-*/
+/*
+ * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
 package org.opendaylight.controller.config.yang.md.sal.dom.impl;
 
-import org.opendaylight.controller.config.yang.md.sal.dom.statistics.DomBrokerRuntimeMXBeanImpl;
+import org.opendaylight.controller.md.sal.dom.api.DOMDataBroker;
 import org.opendaylight.controller.sal.core.api.data.DataStore;
 import org.opendaylight.controller.sal.dom.broker.BrokerConfigActivator;
 import org.opendaylight.controller.sal.dom.broker.BrokerImpl;
 import org.osgi.framework.BundleContext;
 
-import static com.google.common.base.Preconditions.*;
-
 /**
 *
 */
@@ -25,29 +21,30 @@ public final class DomBrokerImplModule extends org.opendaylight.controller.confi
 
     private BundleContext bundleContext;
 
-    public DomBrokerImplModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
+    public DomBrokerImplModule(final org.opendaylight.controller.config.api.ModuleIdentifier identifier, final org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
         super(identifier, dependencyResolver);
     }
 
-    public DomBrokerImplModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, DomBrokerImplModule oldModule, java.lang.AutoCloseable oldInstance) {
+    public DomBrokerImplModule(final org.opendaylight.controller.config.api.ModuleIdentifier identifier, final org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, final DomBrokerImplModule oldModule, final java.lang.AutoCloseable oldInstance) {
         super(identifier, dependencyResolver, oldModule, oldInstance);
     }
 
     @Override
     public void validate(){
         super.validate();
-        checkArgument(getDataStore() != null, "Data Store needs to be provided for DomBroker");
     }
-    
+
     @Override
     public java.lang.AutoCloseable createInstance() {
         final BrokerImpl broker = new BrokerImpl();
         final BrokerConfigActivator activator = new BrokerConfigActivator();
         final DataStore store = getDataStoreDependency();
-        activator.start(broker, store, getBundleContext());
-        
-        final DomBrokerImplRuntimeMXBean domBrokerRuntimeMXBean = new DomBrokerRuntimeMXBeanImpl(activator.getDataService());
-        getRootRuntimeBeanRegistratorWrapper().register(domBrokerRuntimeMXBean);
+        final DOMDataBroker asyncBroker= getAsyncDataBrokerDependency();
+
+        activator.start(broker, store, asyncBroker,getBundleContext());
+
+//        final DomBrokerImplRuntimeMXBean domBrokerRuntimeMXBean = new DomBrokerRuntimeMXBeanImpl(activator.getDataService());
+//        getRootRuntimeBeanRegistratorWrapper().register(domBrokerRuntimeMXBean);
         return broker;
     }
 
@@ -55,7 +52,7 @@ public final class DomBrokerImplModule extends org.opendaylight.controller.confi
         return this.bundleContext;
     }
 
-    public void setBundleContext(BundleContext bundleContext) {
+    public void setBundleContext(final BundleContext bundleContext) {
         this.bundleContext = bundleContext;
     }
 }