Fix modules Restconf call for mounted devices
[controller.git] / opendaylight / md-sal / sal-dom-api / src / main / java / org / opendaylight / controller / sal / core / api / RpcProvisionRegistry.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.sal.core.api;
9
10 import org.opendaylight.controller.md.sal.common.api.routing.RouteChangePublisher;
11 import org.opendaylight.controller.md.sal.dom.api.DOMService;
12 import org.opendaylight.controller.sal.core.api.Broker.RoutedRpcRegistration;
13 import org.opendaylight.controller.sal.core.api.Broker.RpcRegistration;
14 import org.opendaylight.yangtools.concepts.ListenerRegistration;
15 import org.opendaylight.yangtools.yang.common.QName;
16 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
17
18 /**
19  * @deprecated Use {@link org.opendaylight.controller.md.sal.dom.api.DOMRpcProviderService} and {@link org.opendaylight.controller.md.sal.dom.api.DOMRpcService} instead.
20  */
21 @Deprecated
22 public interface RpcProvisionRegistry extends RpcImplementation, BrokerService, RouteChangePublisher<RpcRoutingContext, YangInstanceIdentifier>, DOMService {
23
24     /**
25      * Registers an implementation of the rpc.
26      *
27      * <p>
28      * The registered rpc functionality will be available to all other
29      * consumers and providers registered to the broker, which are aware of
30      * the {@link QName} assigned to the rpc.
31      *
32      * <p>
33      * There is no assumption that rpc type is in the set returned by
34      * invoking {@link RpcImplementation#getSupportedRpcs()}. This allows
35      * for dynamic rpc implementations.
36      *
37      * @param rpcType
38      *            Name of Rpc
39      * @param implementation
40      *            Provider's Implementation of the RPC functionality
41      * @throws IllegalArgumentException
42      *             If the name of RPC is invalid
43      */
44     RpcRegistration addRpcImplementation(QName rpcType, RpcImplementation implementation)
45             throws IllegalArgumentException;
46
47     ListenerRegistration<RpcRegistrationListener> addRpcRegistrationListener(RpcRegistrationListener listener);
48
49     RoutedRpcRegistration addRoutedRpcImplementation(QName rpcType, RpcImplementation implementation);
50
51   /**
52    * Sets this RoutedRpc Implementation as a delegate rpc provider and will be asked to invoke rpc if the
53    * current provider can't service the rpc request
54    *
55    * @param defaultImplementation
56    *              Provider's implementation of RPC functionality
57    */
58     public void setRoutedRpcDefaultDelegate(RoutedRpcDefaultImplementation defaultImplementation);
59 }