Fix typo in match types yang model
[controller.git] / opendaylight / md-sal / sal-binding-util / src / main / java / org / opendaylight / controller / md / sal / binding / util / AbstractBindingSalProviderInstance.java
1 /*
2  * Copyright (c) 2014 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.md.sal.binding.util;
9
10 import java.util.concurrent.ExecutorService;
11
12 import org.opendaylight.controller.md.sal.common.api.RegistrationListener;
13 import org.opendaylight.controller.md.sal.common.api.data.DataCommitHandler;
14 import org.opendaylight.controller.md.sal.common.api.data.DataCommitHandlerRegistration;
15 import org.opendaylight.controller.md.sal.common.api.data.DataReader;
16 import org.opendaylight.controller.md.sal.common.api.routing.RouteChangeListener;
17 import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.RoutedRpcRegistration;
18 import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.RpcRegistration;
19 import org.opendaylight.controller.sal.binding.api.NotificationProviderService;
20 import org.opendaylight.controller.sal.binding.api.RpcProviderRegistry;
21 import org.opendaylight.controller.sal.binding.api.data.DataProviderService;
22 import org.opendaylight.controller.sal.binding.api.mount.MountProviderInstance;
23 import org.opendaylight.controller.sal.binding.api.rpc.RpcContextIdentifier;
24 import org.opendaylight.yangtools.concepts.ListenerRegistration;
25 import org.opendaylight.yangtools.concepts.Registration;
26 import org.opendaylight.yangtools.yang.binding.DataObject;
27 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
28 import org.opendaylight.yangtools.yang.binding.Notification;
29 import org.opendaylight.yangtools.yang.binding.RpcService;
30
31 public abstract class AbstractBindingSalProviderInstance<D extends DataProviderService, N extends NotificationProviderService, R extends RpcProviderRegistry> //
32         extends AbstractBindingSalConsumerInstance<D, N, R> //
33         implements //
34         DataProviderService, //
35         RpcProviderRegistry, //
36         NotificationProviderService {
37
38     public AbstractBindingSalProviderInstance(R rpcRegistry, N notificationBroker,
39             D dataBroker) {
40         super(rpcRegistry, notificationBroker, dataBroker);
41     }
42
43     @Override
44     public Registration<DataReader<InstanceIdentifier<? extends DataObject>, DataObject>> registerDataReader(
45             InstanceIdentifier<? extends DataObject> path,
46             DataReader<InstanceIdentifier<? extends DataObject>, DataObject> reader) {
47         return getDataBrokerChecked().registerDataReader(path, reader);
48     }
49
50     @Override
51     public Registration<DataCommitHandler<InstanceIdentifier<? extends DataObject>, DataObject>> registerCommitHandler(
52             InstanceIdentifier<? extends DataObject> path,
53             DataCommitHandler<InstanceIdentifier<? extends DataObject>, DataObject> commitHandler) {
54         return getDataBrokerChecked().registerCommitHandler(path, commitHandler);
55     }
56
57     @Override
58     public ListenerRegistration<RegistrationListener<DataCommitHandlerRegistration<InstanceIdentifier<? extends DataObject>, DataObject>>> registerCommitHandlerListener(
59             RegistrationListener<DataCommitHandlerRegistration<InstanceIdentifier<? extends DataObject>, DataObject>> commitHandlerListener) {
60         return getDataBrokerChecked().registerCommitHandlerListener(commitHandlerListener);
61     }
62
63     @Override
64     public <T extends RpcService> RpcRegistration<T> addRpcImplementation(Class<T> type, T implementation)
65             throws IllegalStateException {
66         return getRpcRegistryChecked().addRpcImplementation(type, implementation);
67     }
68
69     @Override
70     public <T extends RpcService> RoutedRpcRegistration<T> addRoutedRpcImplementation(Class<T> type, T implementation)
71             throws IllegalStateException {
72         return getRpcRegistryChecked().addRoutedRpcImplementation(type, implementation);
73     }
74
75     @Override
76     @Deprecated
77     public void notify(Notification notification) {
78         getNotificationBrokerChecked().notify(notification);
79     }
80
81     @Override
82     @Deprecated
83     public void notify(Notification notification, ExecutorService service) {
84         getNotificationBrokerChecked().notify(notification, service);
85     }
86
87     @Override
88     public void publish(Notification notification) {
89         getNotificationBrokerChecked().publish(notification);
90     }
91
92     @Override
93     public void publish(Notification notification, ExecutorService service) {
94         getNotificationBrokerChecked().publish(notification, service);
95     }
96
97     @Override
98     public <L extends RouteChangeListener<RpcContextIdentifier, InstanceIdentifier<?>>> ListenerRegistration<L> registerRouteChangeListener(
99             L listener) {
100         return getRpcRegistryChecked().registerRouteChangeListener(listener);
101     }
102     
103     @Override
104     public ListenerRegistration<NotificationInterestListener> registerInterestListener(
105             NotificationInterestListener interestListener) {
106         return getNotificationBrokerChecked().registerInterestListener(interestListener);
107     }
108 }