Bug:129 Connection Manager Dashlet
[controller.git] / opendaylight / md-sal / sal-connector-api / src / main / java / org / opendaylight / controller / sal / connector / api / RpcRouter.java
1 package org.opendaylight.controller.sal.connector.api;
2
3 import java.util.concurrent.Future;
4
5 /**
6  * 
7  * @author ttkacik
8  *
9  * @param <C> Routing Context Identifier
10  * @param <R> Route Type
11  * @param <T> Rpc Type
12  * @param <D> Data Type
13  */
14 public interface RpcRouter<C,R,T,D> {
15
16     
17     
18     Future<RpcReply<D>> sendRpc(RpcRequest<C, R, T, D> input);
19     
20     
21     /**
22      * 
23      * @author 
24      *
25      * @param <C> Routing Context Identifier
26         * @param <R> Route Type
27         * @param <T> Rpc Type
28         * @param <D> Data Type
29      */
30     public interface RpcRequest<C,R,T,D> {
31
32         RouteIdentifier<C,R,T> getRoutingInformation();
33         D getPayload();
34     }
35     
36     public interface RouteIdentifier<C,R,T> {
37         
38         C getContext(); // defines a routing table (e.g. NodeContext)
39         R getRoute(); // e.g. (node identity)
40         T getType(); // rpc type
41     }
42     
43     public interface RpcReply<D> {
44         D getPayload();
45     }
46 }