X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-dom-broker%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Fdom%2Fbroker%2FBrokerImpl.xtend;h=8f734d7d4c3934a22c1ca91af146534a0a5fac5b;hp=7ef594bad94cddd77db1136f6a2e9a311d4203e9;hb=082d7ba433b85d5810c50f624d2691088336e66a;hpb=abf4ba1b0854fdd8b1a15c8c4481cf4b0bc93068 diff --git a/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/BrokerImpl.xtend b/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/BrokerImpl.xtend index 7ef594bad9..8f734d7d4c 100644 --- a/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/BrokerImpl.xtend +++ b/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/BrokerImpl.xtend @@ -29,8 +29,13 @@ import org.slf4j.LoggerFactory import org.opendaylight.controller.sal.dom.broker.spi.RpcRouter import org.opendaylight.yangtools.concepts.ListenerRegistration import org.opendaylight.controller.sal.core.api.RpcRegistrationListener +import org.opendaylight.controller.sal.core.api.RpcProvisionRegistry +import org.opendaylight.controller.sal.core.api.RpcImplementation +import org.opendaylight.controller.md.sal.common.api.routing.RouteChangeListener +import org.opendaylight.controller.sal.core.api.RpcRoutingContext +import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier -public class BrokerImpl implements Broker, AutoCloseable { +public class BrokerImpl implements Broker, RpcProvisionRegistry, AutoCloseable { private static val log = LoggerFactory.getLogger(BrokerImpl); // Broker Generic Context @@ -52,7 +57,7 @@ public class BrokerImpl implements Broker, AutoCloseable { override registerConsumer(Consumer consumer, BundleContext ctx) { checkPredicates(consumer); - log.info("Registering consumer " + consumer); + log.trace("Registering consumer " + consumer); val session = newSessionFor(consumer, ctx); consumer.onSessionInitiated(session); sessions.add(session); @@ -68,7 +73,7 @@ public class BrokerImpl implements Broker, AutoCloseable { return session; } - protected def Future> invokeRpc(QName rpc, CompositeNode input) { + protected def Future> invokeRpcAsync(QName rpc, CompositeNode input) { val result = executor.submit([|router.invokeRpc(rpc, input)] as Callable>); return result; } @@ -115,4 +120,28 @@ public class BrokerImpl implements Broker, AutoCloseable { deactivator?.close(); } + override addRpcImplementation(QName rpcType, RpcImplementation implementation) throws IllegalArgumentException { + router.addRpcImplementation(rpcType,implementation); + } + + override addRoutedRpcImplementation(QName rpcType, RpcImplementation implementation) { + router.addRoutedRpcImplementation(rpcType,implementation); + } + + override addRpcRegistrationListener(RpcRegistrationListener listener) { + return router.addRpcRegistrationListener(listener); + } + + override > registerRouteChangeListener(L listener) { + return router.registerRouteChangeListener(listener); + } + + override invokeRpc(QName rpc,CompositeNode input){ + return router.invokeRpc(rpc,input) + } + + override getSupportedRpcs() { + return router.getSupportedRpcs(); + } + }