summaryrefslogtreecommitdiffstats
path: root/sources/hv-collector-main/src
diff options
context:
space:
mode:
authorPiotr Jaszczyk <piotr.jaszczyk@nokia.com>2019-04-03 12:12:17 +0200
committerPiotr Jaszczyk <piotr.jaszczyk@nokia.com>2019-04-03 12:12:17 +0200
commitc7a3e0738abf581640059587dbb81790339340c9 (patch)
tree0c66b6b8a63391881e8d598f7c5348a936bb4abd /sources/hv-collector-main/src
parent302d27926c76bb99eecc4f74d333d0e8ff240c6e (diff)
Simplify factory/provider logic
Change-Id: I59467c41e1de63ead7c190a7c8fd688e3216237a Issue-ID: DCAEGEN2-1385 Signed-off-by: Piotr Jaszczyk <piotr.jaszczyk@nokia.com>
Diffstat (limited to 'sources/hv-collector-main/src')
-rw-r--r--sources/hv-collector-main/src/main/kotlin/org/onap/dcae/collectors/veshv/main/servers/VesServer.kt10
1 files changed, 4 insertions, 6 deletions
diff --git a/sources/hv-collector-main/src/main/kotlin/org/onap/dcae/collectors/veshv/main/servers/VesServer.kt b/sources/hv-collector-main/src/main/kotlin/org/onap/dcae/collectors/veshv/main/servers/VesServer.kt
index fc4d8662..a34b7118 100644
--- a/sources/hv-collector-main/src/main/kotlin/org/onap/dcae/collectors/veshv/main/servers/VesServer.kt
+++ b/sources/hv-collector-main/src/main/kotlin/org/onap/dcae/collectors/veshv/main/servers/VesServer.kt
@@ -21,13 +21,12 @@ package org.onap.dcae.collectors.veshv.main.servers
import org.onap.dcae.collectors.veshv.boundary.Server
import org.onap.dcae.collectors.veshv.config.api.model.HvVesConfiguration
-import org.onap.dcae.collectors.veshv.factory.CollectorFactory
+import org.onap.dcae.collectors.veshv.factory.HvVesCollectorFactory
import org.onap.dcae.collectors.veshv.factory.ServerFactory
import org.onap.dcae.collectors.veshv.factory.AdapterFactory
import org.onap.dcae.collectors.veshv.main.metrics.MicrometerMetrics
import org.onap.dcae.collectors.veshv.model.ServiceContext
import org.onap.dcae.collectors.veshv.utils.ServerHandle
-import org.onap.dcae.collectors.veshv.utils.arrow.then
import org.onap.dcae.collectors.veshv.utils.logging.Logger
import reactor.core.publisher.Mono
@@ -45,8 +44,7 @@ object VesServer {
.doOnNext(::logServerStarted)
private fun createVesServer(config: HvVesConfiguration): Server =
- initializeCollectorFactory(config)
- .createVesHvCollectorProvider()
+ createCollectorProvider(config)
.let { collectorProvider ->
ServerFactory.createNettyTcpServer(
config.server,
@@ -56,8 +54,8 @@ object VesServer {
)
}
- private fun initializeCollectorFactory(config: HvVesConfiguration): CollectorFactory =
- CollectorFactory(
+ private fun createCollectorProvider(config: HvVesConfiguration): HvVesCollectorFactory =
+ HvVesCollectorFactory(
config.collector,
AdapterFactory.sinkCreatorFactory(),
MicrometerMetrics.INSTANCE,