2 * Copyright (c) 2015 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.config.api.DependencyResolver;
11 import org.opendaylight.controller.config.api.ModuleIdentifier;
12 import org.opendaylight.controller.md.sal.binding.impl.BindingDOMNotificationPublishServiceAdapter;
13 import org.opendaylight.controller.md.sal.binding.impl.BindingToNormalizedNodeCodec;
14 import org.opendaylight.controller.md.sal.dom.api.DOMNotificationPublishService;
15 import org.opendaylight.controller.sal.core.api.Broker;
20 * @deprecated Replaced by blueprint wiring
23 public class BindingNotificationPublishAdapterModule extends AbstractBindingNotificationPublishAdapterModule {
24 public BindingNotificationPublishAdapterModule(final ModuleIdentifier identifier,
25 final DependencyResolver dependencyResolver) {
26 super(identifier, dependencyResolver);
29 public BindingNotificationPublishAdapterModule(final ModuleIdentifier identifier,
30 final DependencyResolver dependencyResolver, final BindingNotificationPublishAdapterModule oldModule,
31 final AutoCloseable oldInstance) {
32 super(identifier, dependencyResolver, oldModule, oldInstance);
36 public void customValidation() {
37 // add custom validation form module attributes here.
41 public AutoCloseable createInstance() {
42 final BindingToNormalizedNodeCodec codec = getBindingMappingServiceDependency();
43 final Broker.ProviderSession session = getDomAsyncBrokerDependency().registerProvider(new DummyDOMProvider());
44 final DOMNotificationPublishService publishService = session.getService(DOMNotificationPublishService.class);
45 return new BindingDOMNotificationPublishServiceAdapter(codec, publishService);