2 * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
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
8 package org.opendaylight.controller.sal.connector.api;
10 import java.util.concurrent.Future;
13 * Interface for an RPC router.
17 * @param <C> Routing Context Identifier
18 * @param <R> Route Type
20 * @param <D> Data Type
22 public interface RpcRouter<C,T,R,D> {
23 Future<RpcReply<D>> sendRpc(RpcRequest<C, T, R, D> input);
27 * Interface for an RPC request.
29 * @param <C> Routing Context Identifier
30 * @param <R> Route Type
32 * @param <D> Data Type
34 interface RpcRequest<C,T,R,D> {
36 RouteIdentifier<C,T,R> getRoutingInformation();
41 interface RouteIdentifier<C,T,R> {
43 C getContext(); // defines a routing table (e.g. NodeContext)
45 T getType(); // rpc type
47 R getRoute(); // e.g. (node identity)
50 interface RpcReply<D> {