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.BindingDOMNotificationServiceAdapter;
13 import org.opendaylight.controller.md.sal.binding.impl.BindingToNormalizedNodeCodec;
14 import org.opendaylight.controller.md.sal.dom.api.DOMNotificationService;
15 import org.opendaylight.controller.sal.core.api.Broker;
17 public class BindingNotificationAdapterModule extends AbstractBindingNotificationAdapterModule {
18 public BindingNotificationAdapterModule(final ModuleIdentifier identifier, final DependencyResolver dependencyResolver) {
19 super(identifier, dependencyResolver);
22 public BindingNotificationAdapterModule(final ModuleIdentifier identifier, final DependencyResolver dependencyResolver, final org.opendaylight.controller.config.yang.md.sal.binding.impl.BindingNotificationAdapterModule oldModule, final java.lang.AutoCloseable oldInstance) {
23 super(identifier, dependencyResolver, oldModule, oldInstance);
27 public void customValidation() {
28 // add custom validation form module attributes here.
32 public java.lang.AutoCloseable createInstance() {
33 final BindingToNormalizedNodeCodec codec = getBindingMappingServiceDependency();
34 final Broker.ProviderSession session = getDomAsyncBrokerDependency().registerProvider(new DummyDOMProvider());
35 final DOMNotificationService notifService = session.getService(DOMNotificationService.class);
36 return new BindingDOMNotificationServiceAdapter(codec.getCodecRegistry(), notifService);