Mechanical code cleanup (sal-connector-api)
[controller.git] / opendaylight / md-sal / sal-connector-api / src / main / java / org / opendaylight / controller / sal / connector / api / RpcRouter.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.connector.api;
9
10 import java.util.concurrent.Future;
11
12 /**
13  *
14  * @author ttkacik
15  *
16  * @param <C> Routing Context Identifier
17  * @param <R> Route Type
18  * @param <T> Rpc Type
19  * @param <D> Data Type
20  */
21 public interface RpcRouter<C,T,R,D> {
22
23
24
25     Future<RpcReply<D>> sendRpc(RpcRequest<C, T, R, D> input);
26
27
28     /**
29      *
30      * @author
31      *
32      * @param <C> Routing Context Identifier
33         * @param <R> Route Type
34         * @param <T> Rpc Type
35         * @param <D> Data Type
36      */
37     interface RpcRequest<C,T,R,D> {
38
39         RouteIdentifier<C,T,R> getRoutingInformation();
40         D getPayload();
41     }
42
43     interface RouteIdentifier<C,T,R> {
44
45         C getContext(); // defines a routing table (e.g. NodeContext)
46         T getType(); // rpc type
47         R getRoute(); // e.g. (node identity)
48     }
49
50     interface RpcReply<D> {
51         D getPayload();
52     }
53 }

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.