Merge "Initial implementation of the ClusteredDataStore"
[controller.git] / opendaylight / md-sal / sal-dom-api / src / main / java / org / opendaylight / controller / sal / core / api / RpcProvisionRegistry.java
1 package org.opendaylight.controller.sal.core.api;
2
3 import org.opendaylight.controller.sal.core.api.Broker.RoutedRpcRegistration;
4 import org.opendaylight.controller.sal.core.api.Broker.RpcRegistration;
5 import org.opendaylight.yangtools.yang.common.QName;
6
7 public interface RpcProvisionRegistry {
8
9     /**
10      * Registers an implementation of the rpc.
11      * 
12      * <p>
13      * The registered rpc functionality will be available to all other
14      * consumers and providers registered to the broker, which are aware of
15      * the {@link QName} assigned to the rpc.
16      * 
17      * <p>
18      * There is no assumption that rpc type is in the set returned by
19      * invoking {@link RpcImplementation#getSupportedRpcs()}. This allows
20      * for dynamic rpc implementations.
21      * 
22      * @param rpcType
23      *            Name of Rpc
24      * @param implementation
25      *            Provider's Implementation of the RPC functionality
26      * @throws IllegalArgumentException
27      *             If the name of RPC is invalid
28      */
29     RpcRegistration addRpcImplementation(QName rpcType, RpcImplementation implementation)
30             throws IllegalArgumentException;
31
32     RoutedRpcRegistration addRoutedRpcImplementation(QName rpcType, RpcImplementation implementation);
33 }