diff options
author | Izabela Zawadzka <izabela.zawadzka@nokia.com> | 2019-04-15 13:03:45 +0200 |
---|---|---|
committer | Izabela Zawadzka <izabela.zawadzka@nokia.com> | 2019-04-16 09:18:12 +0200 |
commit | 482ff719edbb728827976622cef63c876cb6676e (patch) | |
tree | 151630129e37fbc751e54cea1922c5432f0125bf /sources/hv-collector-dcae-app-simulator/src | |
parent | 1b4aebbfeb932de091cad98ea66210f472fc2420 (diff) |
Add internal modifiers to comply with new HvVesCustomRule
Change-Id: I33ad24179d05ded58f6784544be9bbdd56210720
Signed-off-by: Izabela Zawadzka <izabela.zawadzka@nokia.com>
Issue-ID: DCAEGEN2-1438
Diffstat (limited to 'sources/hv-collector-dcae-app-simulator/src')
7 files changed, 11 insertions, 11 deletions
diff --git a/sources/hv-collector-dcae-app-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/impl/DcaeAppSimulator.kt b/sources/hv-collector-dcae-app-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/impl/DcaeAppSimulator.kt index 33e9a37e..122d9bf0 100644 --- a/sources/hv-collector-dcae-app-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/impl/DcaeAppSimulator.kt +++ b/sources/hv-collector-dcae-app-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/impl/DcaeAppSimulator.kt @@ -28,7 +28,7 @@ import java.util.Collections.synchronizedMap * @author Piotr Jaszczyk <piotr.jaszczyk@nokia.com> * @since August 2018 */ -class DcaeAppSimulator(private val consumerFactory: ConsumerFactory, +internal class DcaeAppSimulator(private val consumerFactory: ConsumerFactory, private val messageStreamValidation: MessageStreamValidation) { private val consumerState: MutableMap<String, ConsumerStateProvider> = synchronizedMap(mutableMapOf()) @@ -85,4 +85,4 @@ class DcaeAppSimulator(private val consumerFactory: ConsumerFactory, } } -class MissingConsumerException(message: String) : Throwable(message) +internal class MissingConsumerException(message: String) : Throwable(message) diff --git a/sources/hv-collector-dcae-app-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/impl/MessageStreamValidation.kt b/sources/hv-collector-dcae-app-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/impl/MessageStreamValidation.kt index 144aab02..06a8d742 100644 --- a/sources/hv-collector-dcae-app-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/impl/MessageStreamValidation.kt +++ b/sources/hv-collector-dcae-app-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/impl/MessageStreamValidation.kt @@ -31,7 +31,7 @@ import reactor.core.publisher.Mono import java.io.InputStream import javax.json.Json -class MessageStreamValidation( +internal class MessageStreamValidation( private val messageGenerator: VesEventGenerator, private val messageParametersParser: MessageParametersParser = MessageParametersParser.INSTANCE) { diff --git a/sources/hv-collector-dcae-app-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/impl/adapters/DcaeAppApiServer.kt b/sources/hv-collector-dcae-app-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/impl/adapters/DcaeAppApiServer.kt index 6a09be9f..2458b203 100644 --- a/sources/hv-collector-dcae-app-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/impl/adapters/DcaeAppApiServer.kt +++ b/sources/hv-collector-dcae-app-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/impl/adapters/DcaeAppApiServer.kt @@ -41,7 +41,7 @@ import java.net.InetSocketAddress * @author Piotr Jaszczyk <piotr.jaszczyk@nokia.com> * @since May 2018 */ -class DcaeAppApiServer(private val simulator: DcaeAppSimulator) { +internal class DcaeAppApiServer(private val simulator: DcaeAppSimulator) { fun start(socketAddress: InetSocketAddress, kafkaTopics: Set<String>): Mono<ServerHandle> = Mono.defer { diff --git a/sources/hv-collector-dcae-app-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/impl/adapters/KafkaSource.kt b/sources/hv-collector-dcae-app-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/impl/adapters/KafkaSource.kt index 0fd3bb10..b91e7a1c 100644 --- a/sources/hv-collector-dcae-app-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/impl/adapters/KafkaSource.kt +++ b/sources/hv-collector-dcae-app-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/impl/adapters/KafkaSource.kt @@ -31,7 +31,7 @@ import reactor.kafka.receiver.ReceiverRecord * @author Piotr Jaszczyk <piotr.jaszczyk@nokia.com> * @since May 2018 */ -class KafkaSource(private val receiver: KafkaReceiver<ByteArray, ByteArray>) { +internal class KafkaSource(private val receiver: KafkaReceiver<ByteArray, ByteArray>) { fun start(): Flux<ReceiverRecord<ByteArray, ByteArray>> = receiver.receive() diff --git a/sources/hv-collector-dcae-app-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/impl/config/ArgDcaeAppSimConfiguration.kt b/sources/hv-collector-dcae-app-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/impl/config/ArgDcaeAppSimConfiguration.kt index f6d1eab7..fb0e61f5 100644 --- a/sources/hv-collector-dcae-app-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/impl/config/ArgDcaeAppSimConfiguration.kt +++ b/sources/hv-collector-dcae-app-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/impl/config/ArgDcaeAppSimConfiguration.kt @@ -34,7 +34,7 @@ import org.onap.dcae.collectors.veshv.domain.WireFrameMessage import org.onap.dcae.collectors.veshv.utils.arrow.OptionUtils.binding import java.net.InetSocketAddress -class ArgDcaeAppSimConfiguration : ArgBasedConfiguration<DcaeAppSimConfiguration>(DefaultParser()) { +internal class ArgDcaeAppSimConfiguration : ArgBasedConfiguration<DcaeAppSimConfiguration>(DefaultParser()) { override val cmdLineOptionsList: List<CommandLineOption> = listOf( LISTEN_PORT, MAXIMUM_PAYLOAD_SIZE_BYTES, diff --git a/sources/hv-collector-dcae-app-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/impl/config/DcaeAppSimConfiguration.kt b/sources/hv-collector-dcae-app-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/impl/config/DcaeAppSimConfiguration.kt index 2b0382ac..a503e5b5 100644 --- a/sources/hv-collector-dcae-app-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/impl/config/DcaeAppSimConfiguration.kt +++ b/sources/hv-collector-dcae-app-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/impl/config/DcaeAppSimConfiguration.kt @@ -21,7 +21,7 @@ package org.onap.dcae.collectors.veshv.simulators.dcaeapp.impl.config import java.net.InetSocketAddress -data class DcaeAppSimConfiguration( +internal data class DcaeAppSimConfiguration( val apiAddress: InetSocketAddress, val maxPayloadSizeBytes: Int, val kafkaBootstrapServers: String, diff --git a/sources/hv-collector-dcae-app-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/impl/consumer.kt b/sources/hv-collector-dcae-app-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/impl/consumer.kt index a6d1eddb..2de89aae 100644 --- a/sources/hv-collector-dcae-app-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/impl/consumer.kt +++ b/sources/hv-collector-dcae-app-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/impl/consumer.kt @@ -28,7 +28,7 @@ import java.util.concurrent.ConcurrentLinkedQueue * @author Piotr Jaszczyk <piotr.jaszczyk@nokia.com> * @since June 2018 */ -class ConsumerState(private val messages: ConcurrentLinkedQueue<ByteArray>) { +internal class ConsumerState(private val messages: ConcurrentLinkedQueue<ByteArray>) { val messagesCount: Int by lazy { messages.size } @@ -38,12 +38,12 @@ class ConsumerState(private val messages: ConcurrentLinkedQueue<ByteArray>) { } } -interface ConsumerStateProvider { +internal interface ConsumerStateProvider { fun currentState(): ConsumerState fun reset() } -class Consumer : ConsumerStateProvider { +internal class Consumer : ConsumerStateProvider { private var consumedMessages: ConcurrentLinkedQueue<ByteArray> = ConcurrentLinkedQueue() @@ -61,7 +61,7 @@ class Consumer : ConsumerStateProvider { } } -class ConsumerFactory(private val kafkaBootstrapServers: String) { +internal class ConsumerFactory(private val kafkaBootstrapServers: String) { fun createConsumersForTopics(kafkaTopics: Set<String>): Map<String, Consumer> = KafkaSource.create(kafkaBootstrapServers, kafkaTopics).let { kafkaSource -> val topicToConsumer = kafkaTopics.associate { it to Consumer() } |