X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-binding-broker%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Fbinding%2Fcodegen%2Fimpl%2FRpcRouterCodegenInstance.xtend;h=b6dcde19ee18a4ae3e05571b6c56e448d50c1794;hp=f63f2a313ef58375e95d165f4b5823b504cda3d4;hb=d490a11b531a724b9f46ca931b2c98e9527dde7f;hpb=8b6075992f1e18eb678ee4e50e13b3d2d1397a85 diff --git a/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/sal/binding/codegen/impl/RpcRouterCodegenInstance.xtend b/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/sal/binding/codegen/impl/RpcRouterCodegenInstance.xtend index f63f2a313e..b6dcde19ee 100644 --- a/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/sal/binding/codegen/impl/RpcRouterCodegenInstance.xtend +++ b/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/sal/binding/codegen/impl/RpcRouterCodegenInstance.xtend @@ -8,8 +8,8 @@ import static extension org.opendaylight.controller.sal.binding.codegen.RuntimeC import java.util.Set import java.util.HashMap import org.opendaylight.controller.sal.binding.spi.RpcRoutingTable -import org.opendaylight.yangtools.yang.binding.DataObject -import static org.opendaylight.controller.sal.binding.codegen.impl.XtendHelper.* +import org.opendaylight.yangtools.yang.binding.DataContainer +import org.opendaylight.yangtools.yang.binding.RpcImplementation class RpcRouterCodegenInstance implements RpcRouter { @@ -17,20 +17,29 @@ class RpcRouterCodegenInstance implements RpcRouter { val T invocationProxy @Property - val Class rpcServiceType + val RpcImplementation invokerDelegate; + + @Property + val Class serviceType @Property val Set> contexts - val routingTables = new HashMap, RpcRoutingTableImpl>; + @Property + val Set> supportedInputs; + + val routingTables = new HashMap, RpcRoutingTableImpl>; @Property var T defaultService - new(Class type, T routerImpl, Set> contexts) { - _rpcServiceType = type + new(Class type, T routerImpl, Set> contexts, + Set> inputs) { + _serviceType = type _invocationProxy = routerImpl + _invokerDelegate = routerImpl as RpcImplementation _contexts = contexts + _supportedInputs = inputs; for (ctx : contexts) { val table = XtendHelper.createRoutingTable(ctx) @@ -47,4 +56,9 @@ class RpcRouterCodegenInstance implements RpcRouter { val table = getRoutingTable(context); return table.getRoute(path); } + + override invoke(Class type, T input) { + return invokerDelegate.invoke(type, input); + } + }