From: Gilles Thouenon Date: Mon, 13 Mar 2023 17:19:46 +0000 (+0100) Subject: Convert RendererServiceOperationsImpl to Component X-Git-Tag: 8.0.0~86 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=commitdiff_plain;h=8be843a39021292a3f4dbdd36e43d133734ebdf2;p=transportpce.git Convert RendererServiceOperationsImpl to Component JIRA: TRNSPRTPCE-736 Signed-off-by: Gilles Thouenon Change-Id: I32ab1729a11deccbb9ceb4512181275a04ff8972 --- diff --git a/renderer/src/main/java/org/opendaylight/transportpce/renderer/provisiondevice/RendererServiceOperationsImpl.java b/renderer/src/main/java/org/opendaylight/transportpce/renderer/provisiondevice/RendererServiceOperationsImpl.java index c8c620d4c..4b95bb914 100644 --- a/renderer/src/main/java/org/opendaylight/transportpce/renderer/provisiondevice/RendererServiceOperationsImpl.java +++ b/renderer/src/main/java/org/opendaylight/transportpce/renderer/provisiondevice/RendererServiceOperationsImpl.java @@ -76,10 +76,14 @@ import org.opendaylight.yang.gen.v1.http.org.transportpce.common.types.rev220926 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.opendaylight.yangtools.yang.binding.Notification; import org.opendaylight.yangtools.yang.common.Uint32; +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; +@Component(immediate = true) public class RendererServiceOperationsImpl implements RendererServiceOperations { private static final Logger LOG = LoggerFactory.getLogger(RendererServiceOperationsImpl.class); @@ -103,9 +107,13 @@ public class RendererServiceOperationsImpl implements RendererServiceOperations private final PortMapping portMapping; private ListeningExecutorService executor; - public RendererServiceOperationsImpl(DeviceRendererService deviceRenderer, - OtnDeviceRendererService otnDeviceRenderer, TransportpceOlmService olmService, - DataBroker dataBroker, NotificationPublishService notificationPublishService, PortMapping portMapping) { + @Activate + public RendererServiceOperationsImpl(@Reference DeviceRendererService deviceRenderer, + @Reference OtnDeviceRendererService otnDeviceRenderer, + @Reference TransportpceOlmService olmService, + @Reference DataBroker dataBroker, + @Reference NotificationPublishService notificationPublishService, + @Reference PortMapping portMapping) { this.deviceRenderer = deviceRenderer; this.otnDeviceRenderer = otnDeviceRenderer; this.olmService = olmService; @@ -113,6 +121,7 @@ public class RendererServiceOperationsImpl implements RendererServiceOperations this.notificationPublishService = notificationPublishService; this.portMapping = portMapping; this.executor = MoreExecutors.listeningDecorator(Executors.newFixedThreadPool(NUMBER_OF_THREADS)); + LOG.debug("RendererServiceOperationsImpl instantiated"); } @Override diff --git a/renderer/src/main/resources/OSGI-INF/blueprint/renderer-blueprint.xml b/renderer/src/main/resources/OSGI-INF/blueprint/renderer-blueprint.xml index 80dd82543..e56b693d3 100644 --- a/renderer/src/main/resources/OSGI-INF/blueprint/renderer-blueprint.xml +++ b/renderer/src/main/resources/OSGI-INF/blueprint/renderer-blueprint.xml @@ -9,35 +9,16 @@ and is available at http://www.eclipse.org/legal/epl-v10.html --> - - - - - - - - - + - - + - - - - - - - - - @@ -45,7 +26,4 @@ and is available at http://www.eclipse.org/legal/epl-v10.html - -