use of org.opendaylight.mdsal.binding.api.RpcProviderService in project bgpcep by opendaylight.
the class PCEPTopologyProvider method enableRPCs.
private synchronized void enableRPCs(final SettableFuture<Empty> future, final ChannelFuture channelFuture) {
final var channelFailure = channelFuture.cause();
if (channelFailure != null) {
LOG.error("Topology Provider {} failed to initialize server channel", topologyId(), channelFailure);
disableManager(future);
return;
}
channel = channelFuture.channel();
// Register RPCs
final RpcProviderService rpcRegistry = dependencies.getRpcProviderRegistry();
elementReg = rpcRegistry.registerRpcImplementation(NetworkTopologyPcepService.class, new TopologyRPCs(manager), Set.of(instanceIdentifier));
networkReg = rpcRegistry.registerRpcImplementation(NetworkTopologyPcepProgrammingService.class, new TopologyProgramming(scheduler, manager), Set.of(instanceIdentifier));
// We are now completely initialized
LOG.info("PCEP Topology Provider {} enabled", topologyId());
finishOperation(future);
}
Aggregations