use of org.onosproject.yang.model.RpcContext in project onos by opennetworkinglab.
the class DynamicConfigManager method invokeRpc.
@Override
public CompletableFuture<RpcOutput> invokeRpc(RpcInput input) {
checkNotNull(input);
checkNotNull(input.id());
RpcContext context = contextProvider.getRpcContext(input.id());
String srvcIntf = context.serviceIntf().getName();
RpcService handler = handlerRegistry.get(srvcIntf);
if (handler == null) {
throw new FailedException("No registered handler found, cannot invoke");
}
return CompletableFuture.supplyAsync(new RpcExecutor(handler, getSvcId(handler, srvcIntf), context.rpcName(), RpcMessageId.generate(), input));
}
Aggregations