2 * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.controller.config.yang.md.sal.dom.impl;
10 import org.opendaylight.controller.md.sal.dom.api.DOMDataBroker;
11 import org.opendaylight.controller.sal.core.api.data.DataStore;
12 import org.opendaylight.controller.sal.dom.broker.BrokerConfigActivator;
13 import org.opendaylight.controller.sal.dom.broker.BrokerImpl;
14 import org.osgi.framework.BundleContext;
19 public final class DomBrokerImplModule extends org.opendaylight.controller.config.yang.md.sal.dom.impl.AbstractDomBrokerImplModule
22 private BundleContext bundleContext;
24 public DomBrokerImplModule(final org.opendaylight.controller.config.api.ModuleIdentifier identifier, final org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
25 super(identifier, dependencyResolver);
28 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) {
29 super(identifier, dependencyResolver, oldModule, oldInstance);
33 public void validate(){
38 public java.lang.AutoCloseable createInstance() {
39 final BrokerImpl broker = new BrokerImpl();
40 final BrokerConfigActivator activator = new BrokerConfigActivator();
41 final DataStore store = getDataStoreDependency();
42 final DOMDataBroker asyncBroker= getAsyncDataBrokerDependency();
44 activator.start(broker, store, asyncBroker,getBundleContext());
46 // final DomBrokerImplRuntimeMXBean domBrokerRuntimeMXBean = new DomBrokerRuntimeMXBeanImpl(activator.getDataService());
47 // getRootRuntimeBeanRegistratorWrapper().register(domBrokerRuntimeMXBean);
51 private BundleContext getBundleContext() {
52 return this.bundleContext;
55 public void setBundleContext(final BundleContext bundleContext) {
56 this.bundleContext = bundleContext;