aboutsummaryrefslogtreecommitdiffstats
path: root/sources/hv-collector-core/src
diff options
context:
space:
mode:
authorJakub Dudycz <jakub.dudycz@nokia.com>2019-04-08 14:09:16 +0200
committerJakub Dudycz <jakub.dudycz@nokia.com>2019-04-10 11:06:03 +0200
commit735469d5003388df3622819c3d1db0e89a64197c (patch)
treec22ff39ee81b84855e936aed1865ed8860c20b96 /sources/hv-collector-core/src
parentc9829d23c12b2824a0d56ee6efbd00ad67b9046e (diff)
Move maxPayloadSizeBytes to CollectorConfiguration
Signed-off-by: Jakub Dudycz <jakub.dudycz@nokia.com> Issue-ID: DCAEGEN2-1387 Change-Id: I37151a58f5244841243dc531912af2ef50ea5d3c
Diffstat (limited to 'sources/hv-collector-core/src')
-rw-r--r--sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/factory/HvVesCollectorFactory.kt7
1 files changed, 4 insertions, 3 deletions
diff --git a/sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/factory/HvVesCollectorFactory.kt b/sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/factory/HvVesCollectorFactory.kt
index 3524f14c..c3c5d733 100644
--- a/sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/factory/HvVesCollectorFactory.kt
+++ b/sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/factory/HvVesCollectorFactory.kt
@@ -37,8 +37,7 @@ import org.onap.dcae.collectors.veshv.model.ClientContext
*/
class HvVesCollectorFactory(private val configuration: CollectorConfiguration,
private val sinkFactory: SinkFactory,
- private val metrics: Metrics,
- private val maxPayloadSizeBytes: Int): CollectorFactory {
+ private val metrics: Metrics) : CollectorFactory {
override fun invoke(ctx: ClientContext): Collector =
createVesHvCollector(ctx)
@@ -48,7 +47,9 @@ class HvVesCollectorFactory(private val configuration: CollectorConfiguration,
private fun createVesHvCollector(ctx: ClientContext): Collector =
HvVesCollector(
clientContext = ctx,
- wireChunkDecoder = WireChunkDecoder(WireFrameDecoder(maxPayloadSizeBytes), ctx),
+ wireChunkDecoder = WireChunkDecoder(
+ WireFrameDecoder(configuration.maxPayloadSizeBytes), ctx
+ ),
protobufDecoder = VesDecoder(),
router = Router(configuration.routing, sinkFactory, ctx, metrics),
metrics = metrics)