X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-binding-broker%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Fbinding%2Fcodegen%2Fimpl%2FRpcRouterCodegenInstance.java;h=5578f75ae21d6800cf2c73661afa15a071bd6ef8;hb=fd8c7a6e7445ca9788c2557caa9da5af8c8a2153;hp=8b2db8b13cd09b175fc1269ebec693717b70aab5;hpb=66af51651ec5099484fc25ae53eaf38370bb9f30;p=controller.git diff --git a/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/sal/binding/codegen/impl/RpcRouterCodegenInstance.java b/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/sal/binding/codegen/impl/RpcRouterCodegenInstance.java index 8b2db8b13c..5578f75ae2 100644 --- a/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/sal/binding/codegen/impl/RpcRouterCodegenInstance.java +++ b/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/sal/binding/codegen/impl/RpcRouterCodegenInstance.java @@ -1,27 +1,32 @@ +/* + * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ package org.opendaylight.controller.sal.binding.codegen.impl; -import org.opendaylight.yangtools.yang.binding.RpcService; -import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.RoutedRpcRegistration; -import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.RpcRegistration; -import org.opendaylight.controller.sal.binding.spi.RpcRouter; -import org.opendaylight.yangtools.yang.binding.BaseIdentity; -import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; - -import static org.opendaylight.controller.sal.binding.codegen.RuntimeCodeHelper.*; +import static org.opendaylight.controller.sal.binding.codegen.RuntimeCodeHelper.setRoutingTable; +import java.util.HashMap; import java.util.Map; import java.util.Set; -import java.util.HashMap; -import org.opendaylight.controller.sal.binding.spi.RpcRoutingTable; -import org.opendaylight.yangtools.yang.binding.DataContainer; -import org.opendaylight.yangtools.yang.binding.RpcImplementation; -import org.opendaylight.controller.md.sal.common.api.routing.MutableRoutingTable; import org.opendaylight.controller.md.sal.common.api.routing.RouteChange; import org.opendaylight.controller.md.sal.common.api.routing.RouteChangeListener; +import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.RoutedRpcRegistration; +import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.RpcRegistration; +import org.opendaylight.controller.sal.binding.api.rpc.RpcRouter; +import org.opendaylight.controller.sal.binding.api.rpc.RpcRoutingTable; +import org.opendaylight.controller.sal.binding.codegen.RuntimeCodeHelper; import org.opendaylight.yangtools.concepts.AbstractObjectRegistration; import org.opendaylight.yangtools.concepts.ListenerRegistration; import org.opendaylight.yangtools.concepts.util.ListenerRegistry; +import org.opendaylight.yangtools.yang.binding.BaseIdentity; +import org.opendaylight.yangtools.yang.binding.DataContainer; +import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; +import org.opendaylight.yangtools.yang.binding.RpcService; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -58,11 +63,11 @@ public class RpcRouterCodegenInstance implements // Map, RpcRoutingTableImpl> mutableRoutingTables = new HashMap<>(); for (Class ctx : contexts) { RpcRoutingTableImpl table = new RpcRoutingTableImpl<>(name,ctx,type); - + @SuppressWarnings("rawtypes") Map invokerView = table.getRoutes(); - - setRoutingTable((RpcService) invocationProxy, ctx, invokerView); + + setRoutingTable(invocationProxy, ctx, invokerView); mutableRoutingTables.put(ctx, table); table.registerRouteChangeListener(this); } @@ -125,6 +130,7 @@ public class RpcRouterCodegenInstance implements // @Override public RpcRegistration registerDefaultService(T service) { // TODO Auto-generated method stub + RuntimeCodeHelper.setDelegate(invocationProxy, service); return null; } @@ -147,7 +153,6 @@ public class RpcRouterCodegenInstance implements // @Override public void unregisterPath(Class context, InstanceIdentifier path) { routingTables.get(context).removeRoute(path, getInstance()); - } @Override