Search in sources :

Example 1 with RpcProviderService

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);
}
Also used : NetworkTopologyPcepService(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev200120.NetworkTopologyPcepService) RpcProviderService(org.opendaylight.mdsal.binding.api.RpcProviderService) NetworkTopologyPcepProgrammingService(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.programming.rev181109.NetworkTopologyPcepProgrammingService)

Aggregations

RpcProviderService (org.opendaylight.mdsal.binding.api.RpcProviderService)1 NetworkTopologyPcepProgrammingService (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.programming.rev181109.NetworkTopologyPcepProgrammingService)1 NetworkTopologyPcepService (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev200120.NetworkTopologyPcepService)1