- public ListenableFuture<RpcResult<CompositeNode>> invokeRpc(final QName rpc, final InstanceIdentifier route, final CompositeNode input) {
- checkState(defaultDelegate != null, "No implementation is available for rpc:%s path:%s", rpc, route);
- return defaultDelegate.invokeRpc(rpc, route, input);
+ public ListenableFuture<RpcResult<CompositeNode>> invokeRpc(final QName rpc, final YangInstanceIdentifier route, final CompositeNode input) {
+ if (defaultDelegate == null) {
+ return Futures.immediateFailedCheckedFuture(new RpcImplementationUnavailableException("No RPC implementation found"));
+ }
+
+ LOG.debug("Forwarding RPC {} path {} to delegate {}", rpc, route);
+ return defaultDelegate.invokeRpc(rpc, route, input);