40842c004a2779ede0d231b2fef122920bc4ebc9
[controller.git] / opendaylight / md-sal / sal-dom-broker / src / main / java / org / opendaylight / controller / sal / dom / broker / osgi / RpcProvisionRegistryProxy.java
1 /*
2  * Copyright (c) 2013 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.dom.broker.osgi;
10
11 import org.opendaylight.controller.md.sal.common.api.routing.RouteChangeListener;
12 import org.opendaylight.controller.sal.core.api.*;
13 import org.opendaylight.yangtools.concepts.ListenerRegistration;
14 import org.opendaylight.yangtools.yang.common.QName;
15 import org.opendaylight.yangtools.yang.common.RpcResult;
16 import org.opendaylight.yangtools.yang.data.api.CompositeNode;
17 import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier;
18 import org.osgi.framework.ServiceReference;
19
20 import java.util.Set;
21
22 public class RpcProvisionRegistryProxy extends AbstractBrokerServiceProxy<RpcProvisionRegistry>
23                                        implements RpcProvisionRegistry {
24
25     public RpcProvisionRegistryProxy(ServiceReference<RpcProvisionRegistry> ref, RpcProvisionRegistry delegate) {
26         super(ref, delegate);
27     }
28
29     @Override
30     public Broker.RpcRegistration addRpcImplementation(QName rpcType, RpcImplementation implementation) throws IllegalArgumentException {
31         return getDelegate().addRpcImplementation(rpcType, implementation);
32     }
33
34     @Override
35     public ListenerRegistration<RpcRegistrationListener> addRpcRegistrationListener(RpcRegistrationListener listener) {
36         return getDelegate().addRpcRegistrationListener(listener);
37     }
38
39     @Override
40     public Broker.RoutedRpcRegistration addRoutedRpcImplementation(QName rpcType, RpcImplementation implementation) {
41         return getDelegate().addRoutedRpcImplementation(rpcType, implementation);
42     }
43
44   @Override
45   public void setRoutedRpcDefaultDelegate(RoutedRpcDefaultImplementation defaultImplementation) {
46     getDelegate().setRoutedRpcDefaultDelegate(defaultImplementation);
47   }
48
49   @Override
50     public <L extends RouteChangeListener<RpcRoutingContext, InstanceIdentifier>> ListenerRegistration<L> registerRouteChangeListener(L listener) {
51         return getDelegate().registerRouteChangeListener(listener);
52     }
53
54
55   @Override
56   public Set<QName> getSupportedRpcs() {
57     return getDelegate().getSupportedRpcs();
58   }
59
60   @Override
61   public RpcResult<CompositeNode> invokeRpc(QName rpc, CompositeNode input) {
62     return getDelegate().invokeRpc(rpc,input);
63   }
64 }