import org.opendaylight.yangtools.yang.common.ErrorType;
import org.opendaylight.yangtools.yang.common.RpcResult;
import org.opendaylight.yangtools.yang.common.RpcResultBuilder;
+import org.osgi.service.component.annotations.Activate;
+import org.osgi.service.component.annotations.Component;
+import org.osgi.service.component.annotations.Reference;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* The Class OlmPowerServiceRpcImpl.
*/
+@Component
public class OlmPowerServiceRpcImpl implements TransportpceOlmService {
private static final Logger LOG = LoggerFactory.getLogger(OlmPowerServiceRpcImpl.class);
private final OlmPowerService olmPowerService;
- public OlmPowerServiceRpcImpl(OlmPowerService olmPowerService) {
+ @Activate
+ public OlmPowerServiceRpcImpl(@Reference OlmPowerService olmPowerService) {
this.olmPowerService = olmPowerService;
}
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
<reference id="rpcProviderService" interface="org.opendaylight.mdsal.binding.api.RpcProviderService" />
<reference id="olmPowerServiceImpl" interface="org.opendaylight.transportpce.olm.service.OlmPowerService" />
-
- <bean id="olmPowerServiceRpcImpl" class="org.opendaylight.transportpce.olm.OlmPowerServiceRpcImpl">
- <argument ref="olmPowerServiceImpl" />
- </bean>
+ <reference id="olmPowerServiceRpcImpl" interface="org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev210618.TransportpceOlmService"/>
<bean id="provider" class="org.opendaylight.transportpce.olm.OlmProvider"
init-method="init" destroy-method="close">
<argument ref="olmPowerServiceRpcImpl" />
</bean>
- <service ref="olmPowerServiceRpcImpl"
- interface="org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev210618.TransportpceOlmService"/>
</blueprint>