2 * Copyright (c) 2013 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.binding.impl;
10 import org.opendaylight.controller.sal.binding.impl.BindingAwareBrokerImpl;
11 import org.osgi.framework.BundleContext;
13 import com.google.common.base.Preconditions;
18 public final class BindingBrokerImplSingletonModule extends org.opendaylight.controller.config.yang.md.sal.binding.impl.AbstractBindingBrokerImplSingletonModule
21 private BundleContext bundleContext;
23 public BindingBrokerImplSingletonModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
24 super(identifier, dependencyResolver);
27 public BindingBrokerImplSingletonModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, BindingBrokerImplSingletonModule oldModule, java.lang.AutoCloseable oldInstance) {
28 super(identifier, dependencyResolver, oldModule, oldInstance);
32 public void validate() {
34 Preconditions.checkNotNull(getBundleContext());
39 public boolean canReuseInstance(AbstractBindingBrokerImplSingletonModule oldModule) {
44 public java.lang.AutoCloseable createInstance() {
45 BindingAwareBrokerImpl broker = new BindingAwareBrokerImpl(getBundleContext());
50 public BundleContext getBundleContext() {
54 public void setBundleContext(BundleContext bundleContext) {
55 this.bundleContext = bundleContext;