0a10a1d5f9bcfd43e5ce4b8c0e65da31f38d3593
[controller.git] / opendaylight / md-sal / sal-binding-config / src / main / java / org / opendaylight / controller / config / yang / md / sal / binding / impl / BindingNotificationAdapterModule.java
1 /*
2  * Copyright (c) 2015 Cisco Systems, Inc. and others.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.controller.config.yang.md.sal.binding.impl;
9
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;
16
17 /**
18  * @deprecated Replaced by blueprint wiring
19  */
20 @Deprecated
21 public class BindingNotificationAdapterModule extends AbstractBindingNotificationAdapterModule  {
22     public BindingNotificationAdapterModule(final ModuleIdentifier identifier, final DependencyResolver dependencyResolver) {
23         super(identifier, dependencyResolver);
24     }
25
26     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) {
27         super(identifier, dependencyResolver, oldModule, oldInstance);
28     }
29
30     @Override
31     public void customValidation() {
32         // add custom validation form module attributes here.
33     }
34
35     @Override
36     public java.lang.AutoCloseable createInstance() {
37         final BindingToNormalizedNodeCodec codec = getBindingMappingServiceDependency();
38         final Broker.ProviderSession session = getDomAsyncBrokerDependency().registerProvider(new DummyDOMProvider());
39         final DOMNotificationService notifService = session.getService(DOMNotificationService.class);
40         return new BindingDOMNotificationServiceAdapter(codec.getCodecRegistry(), notifService);
41     }
42
43 }

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.