Fix for Bug 3
[controller.git] / opendaylight / md-sal / sal-binding-api / src / main / java / org / opendaylight / controller / sal / binding / api / rpc / RpcRoutingTable.java
1 /*
2  * Copyright (c) 2013 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.binding.api.rpc;
9
10 import java.util.Map;
11
12 import org.opendaylight.controller.md.sal.common.api.routing.MutableRoutingTable;
13 import org.opendaylight.yangtools.yang.binding.BaseIdentity;
14 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
15 import org.opendaylight.yangtools.yang.binding.RpcService;
16
17 public interface RpcRoutingTable<C extends BaseIdentity, S extends RpcService> extends
18         MutableRoutingTable<Class<? extends C>, InstanceIdentifier<?>, S> {
19
20     Class<C> getIdentifier();
21
22     /**
23      * Updates route for particular path to specified instance of
24      * {@link RpcService}.
25      * 
26      * @param path
27      *            Path for which RpcService routing is to be updated
28      * @param service
29      *            Instance of RpcService which is responsible for processing Rpc
30      *            Requests.
31      */
32     void updateRoute(InstanceIdentifier<?> path, S service);
33
34     /**
35      * Deletes a route for particular path
36      * 
37      * @param path
38      *            Path for which
39      */
40     void removeRoute(InstanceIdentifier<?> path);
41
42     /**
43      * 
44      */
45     S getRoute(InstanceIdentifier<?> nodeInstance);
46
47     /**
48      * 
49      * @return
50      */
51     Map<InstanceIdentifier<?>, S> getRoutes();
52 }