Updated implementation of broker (data services, generated code), added Integration...
[controller.git] / opendaylight / md-sal / sal-binding-api / src / main / java / org / opendaylight / controller / sal / binding / api / RpcProviderRegistry.java
1 package org.opendaylight.controller.sal.binding.api;
2
3 import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.RoutedRpcRegistration;
4 import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.RpcRegistration;
5 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
6 import org.opendaylight.yangtools.yang.binding.RpcService;
7
8 /**
9  * Interface defining provider's access to the Rpc Registry
10  * which could be used to register their implementations of service to the MD-SAL.
11  * 
12  * @author ttkacik
13  *
14  */
15 public interface RpcProviderRegistry extends RpcConsumerRegistry {
16     /**
17      * Registers an global RpcService implementation.
18      * 
19      * @param type
20      * @param implementation
21      * @return
22      */
23     <T extends RpcService> RpcRegistration<T> addRpcImplementation(Class<T> type, T implementation)
24             throws IllegalStateException;
25
26     /**
27      * 
28      * Register an Routed RpcService where routing is determined on annotated (in YANG model)
29      * context-reference and value of annotated leaf.
30      * 
31      * @param type Type of RpcService, use generated interface class, not your implementation clas
32      * @param implementation Implementation of RpcService
33      * @return Registration object for routed Rpc which could be used to close an 
34      * 
35      * @throws IllegalStateException
36      */
37     <T extends RpcService> RoutedRpcRegistration<T> addRoutedRpcImplementation(Class<T> type, T implementation)
38             throws IllegalStateException;
39 }