1 package org.opendaylight.controller.sal.binding.codegen.impl
3 import org.opendaylight.controller.sal.binding.spi.RpcRoutingTable
4 import org.opendaylight.yangtools.yang.binding.BaseIdentity
5 import org.opendaylight.yangtools.yang.binding.RpcService
6 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier
8 import org.opendaylight.yangtools.yang.binding.DataObject
9 import java.util.HashMap
11 class RpcRoutingTableImpl<C extends BaseIdentity,S extends RpcService> implements RpcRoutingTable<C,S>{
14 val Class<C> identifier;
20 val Map<InstanceIdentifier<? extends DataObject>,S> routes;
22 new(Class<C> ident, Map<InstanceIdentifier<? extends DataObject>,S> route) {
33 override getRoute(InstanceIdentifier<? extends Object> nodeInstance) {
34 val ret = routes.get(nodeInstance);
41 override removeRoute(InstanceIdentifier<? extends Object> path) {
45 @SuppressWarnings("rawtypes")
46 override updateRoute(InstanceIdentifier<? extends Object> path, S service) {
47 routes.put(path as InstanceIdentifier<? extends DataObject>,service);