X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-binding-config%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fconfig%2Fyang%2Fmd%2Fsal%2Fbinding%2Fimpl%2FRuntimeMappingModule.java;fp=opendaylight%2Fmd-sal%2Fsal-binding-config%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fconfig%2Fyang%2Fmd%2Fsal%2Fbinding%2Fimpl%2FRuntimeMappingModule.java;h=0000000000000000000000000000000000000000;hb=bffaf3906c383141fe72cede16e9ea7d3306ea63;hp=ba264635a08048430c1f825a3a666e0fbd58122d;hpb=bb813bc67d165b02078e0d9aaa194d3232e170e5;p=controller.git diff --git a/opendaylight/md-sal/sal-binding-config/src/main/java/org/opendaylight/controller/config/yang/md/sal/binding/impl/RuntimeMappingModule.java b/opendaylight/md-sal/sal-binding-config/src/main/java/org/opendaylight/controller/config/yang/md/sal/binding/impl/RuntimeMappingModule.java deleted file mode 100644 index ba264635a0..0000000000 --- a/opendaylight/md-sal/sal-binding-config/src/main/java/org/opendaylight/controller/config/yang/md/sal/binding/impl/RuntimeMappingModule.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * 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.binding.impl; - -import com.google.common.base.Preconditions; -import org.opendaylight.controller.config.api.osgi.WaitingServiceTracker; -import org.opendaylight.controller.md.sal.binding.impl.BindingToNormalizedNodeCodec; -import org.osgi.framework.BundleContext; - -/** - * Deprecated. - * - * @deprecated Replaced by blueprint wiring - */ -@Deprecated -public final class RuntimeMappingModule extends AbstractRuntimeMappingModule { - private BundleContext bundleContext; - - public RuntimeMappingModule(final org.opendaylight.controller.config.api.ModuleIdentifier identifier, - final org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) { - super(identifier, dependencyResolver); - } - - public RuntimeMappingModule(final org.opendaylight.controller.config.api.ModuleIdentifier identifier, - final org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, - final RuntimeMappingModule oldModule, final java.lang.AutoCloseable oldInstance) { - super(identifier, dependencyResolver, oldModule, oldInstance); - } - - @Override - public void validate() { - super.validate(); - Preconditions.checkNotNull(bundleContext); - // Add custom validation for module attributes here. - } - - @Override - public boolean canReuseInstance(final AbstractRuntimeMappingModule oldModule) { - return true; - } - - @Override - public AutoCloseable createInstance() { - // We need to return the concrete BindingToNormalizedNodeCodec instance for backwards compatibility - // for CSS users that inject the binding-dom-mapping-service. - final WaitingServiceTracker tracker = - WaitingServiceTracker.create(BindingToNormalizedNodeCodec.class, bundleContext); - final BindingToNormalizedNodeCodec service = tracker.waitForService(WaitingServiceTracker.FIVE_MINUTES); - - // Ideally we would close the ServiceTracker via the returned AutoCloseable but then we'd have to - // proxy the BindingToNormalizedNodeCodec instance which is problematic. It's OK to close the - // ServiceTracker here. - tracker.close(); - return service; - } - - public void setBundleContext(final BundleContext bundleContext) { - this.bundleContext = bundleContext; - } -}