package org.opendaylight.transportpce.olm;
-import com.google.common.collect.ImmutableClassToInstanceMap;
import org.opendaylight.mdsal.binding.api.RpcProviderService;
import org.opendaylight.transportpce.olm.rpc.impl.CalculateSpanlossBaseImpl;
import org.opendaylight.transportpce.olm.rpc.impl.CalculateSpanlossCurrentImpl;
import org.opendaylight.transportpce.olm.rpc.impl.ServicePowerSetupImpl;
import org.opendaylight.transportpce.olm.rpc.impl.ServicePowerTurndownImpl;
import org.opendaylight.transportpce.olm.service.OlmPowerService;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev210618.CalculateSpanlossBase;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev210618.CalculateSpanlossCurrent;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev210618.GetPm;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev210618.ServicePowerReset;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev210618.ServicePowerSetup;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev210618.ServicePowerTurndown;
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;
public OlmPowerServiceRpcImpl(@Reference OlmPowerService olmPowerService,
@Reference RpcProviderService rpcProviderService) {
this.rpcRegistration = rpcProviderService.registerRpcImplementations(
- ImmutableClassToInstanceMap.<Rpc<?, ?>>builder()
- .put(GetPm.class, new GetPmImpl(olmPowerService))
- .put(ServicePowerSetup.class, new ServicePowerSetupImpl(olmPowerService))
- .put(ServicePowerTurndown.class, new ServicePowerTurndownImpl(olmPowerService))
- .put(CalculateSpanlossBase.class, new CalculateSpanlossBaseImpl(olmPowerService))
- .put(CalculateSpanlossCurrent.class, new CalculateSpanlossCurrentImpl(olmPowerService))
- .put(ServicePowerReset.class, new ServicePowerResetImpl(olmPowerService))
- .build());
+ new GetPmImpl(olmPowerService),
+ new ServicePowerSetupImpl(olmPowerService),
+ new ServicePowerTurndownImpl(olmPowerService),
+ new CalculateSpanlossBaseImpl(olmPowerService),
+ new CalculateSpanlossCurrentImpl(olmPowerService),
+ new ServicePowerResetImpl(olmPowerService));
LOG.info("OlmPowerServiceRpcImpl instantiated");
}