X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=pce%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Ftransportpce%2Fpce%2Fimpl%2FPceServiceRPCImpl.java;h=56143f4f7a6f548d273684510a01d8fcb2890684;hb=refs%2Fchanges%2F49%2F110849%2F2;hp=49f8e71b9d29ff7ca5613774315f34f931b90c2d;hpb=198afc243c98aedfc5b30b93c1a5e3052d30868c;p=transportpce.git diff --git a/pce/src/main/java/org/opendaylight/transportpce/pce/impl/PceServiceRPCImpl.java b/pce/src/main/java/org/opendaylight/transportpce/pce/impl/PceServiceRPCImpl.java index 49f8e71b9..56143f4f7 100644 --- a/pce/src/main/java/org/opendaylight/transportpce/pce/impl/PceServiceRPCImpl.java +++ b/pce/src/main/java/org/opendaylight/transportpce/pce/impl/PceServiceRPCImpl.java @@ -7,14 +7,9 @@ */ package org.opendaylight.transportpce.pce.impl; -import com.google.common.collect.ImmutableClassToInstanceMap; import org.opendaylight.mdsal.binding.api.RpcProviderService; import org.opendaylight.transportpce.pce.service.PathComputationService; -import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev240205.CancelResourceReserve; -import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev240205.PathComputationRequest; -import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev240205.PathComputationRerouteRequest; import org.opendaylight.yangtools.concepts.Registration; -import org.opendaylight.yangtools.yang.binding.Rpc; import org.osgi.service.component.annotations.Activate; import org.osgi.service.component.annotations.Component; import org.osgi.service.component.annotations.Deactivate; @@ -33,11 +28,10 @@ public class PceServiceRPCImpl { @Activate public PceServiceRPCImpl(@Reference RpcProviderService rpcProviderService, @Reference PathComputationService pathComputationService) { - this.reg = rpcProviderService.registerRpcImplementations(ImmutableClassToInstanceMap.>builder() - .put(CancelResourceReserve.class, new CancelResourceReserveImpl(pathComputationService)) - .put(PathComputationRequest.class, new PathComputationRequestImpl(pathComputationService)) - .put(PathComputationRerouteRequest.class, new PathComputationRerouteRequestImpl(pathComputationService)) - .build()); + this.reg = rpcProviderService.registerRpcImplementations( + new CancelResourceReserveImpl(pathComputationService), + new PathComputationRequestImpl(pathComputationService), + new PathComputationRerouteRequestImpl(pathComputationService)); LOG.info("PceServiceRPCImpl instantiated"); }