Bug 868: Introduced DOM ForwardingSession utility classes.
[controller.git] / opendaylight / md-sal / sal-dom-spi / src / main / java / org / opendaylight / controller / sal / core / spi / ForwardingProviderSession.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
9 package org.opendaylight.controller.sal.core.spi;
10
11 import java.util.Set;
12 import java.util.concurrent.Future;
13 import org.opendaylight.controller.sal.core.api.Broker.ProviderSession;
14 import org.opendaylight.controller.sal.core.api.Broker.RoutedRpcRegistration;
15 import org.opendaylight.controller.sal.core.api.Broker.RpcRegistration;
16 import org.opendaylight.controller.sal.core.api.BrokerService;
17 import org.opendaylight.controller.sal.core.api.RpcImplementation;
18 import org.opendaylight.controller.sal.core.api.RpcRegistrationListener;
19 import org.opendaylight.yangtools.concepts.ListenerRegistration;
20 import org.opendaylight.yangtools.yang.common.QName;
21 import org.opendaylight.yangtools.yang.common.RpcResult;
22 import org.opendaylight.yangtools.yang.data.api.CompositeNode;
23
24 public abstract class ForwardingProviderSession implements ProviderSession {
25
26
27     protected abstract ProviderSession delegate();
28
29     @Override
30     @Deprecated
31     public RoutedRpcRegistration addMountedRpcImplementation(QName arg0, RpcImplementation arg1) {
32         return delegate().addMountedRpcImplementation(arg0, arg1);
33     }
34
35     @Override
36     @Deprecated
37     public RoutedRpcRegistration addRoutedRpcImplementation(QName arg0, RpcImplementation arg1) {
38         return delegate().addRoutedRpcImplementation(arg0, arg1);
39     }
40
41     @Override
42     @Deprecated
43     public RpcRegistration addRpcImplementation(QName arg0, RpcImplementation arg1)
44             throws IllegalArgumentException {
45         return delegate().addRpcImplementation(arg0, arg1);
46     }
47
48     @Deprecated
49     @Override
50     public ListenerRegistration<RpcRegistrationListener> addRpcRegistrationListener(
51             RpcRegistrationListener arg0) {
52         return delegate().addRpcRegistrationListener(arg0);
53     }
54
55     @Override
56     public void close() {
57         delegate().close();
58     }
59
60     @Override
61     public <T extends BrokerService> T getService(Class<T> arg0) {
62         return delegate().getService(arg0);
63     }
64
65     @Override
66     public Set<QName> getSupportedRpcs() {
67         return delegate().getSupportedRpcs();
68     }
69
70     @Override
71     public boolean isClosed() {
72         return delegate().isClosed();
73     }
74
75     @Override
76     public Future<RpcResult<CompositeNode>> rpc(QName arg0, CompositeNode arg1) {
77         return delegate().rpc(arg0, arg1);
78     }
79
80 }