2 * Copyright © 2018-2019 AT&T Intellectual Property.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 package org.onap.ccsdk.cds.blueprintsprocessor.functions.message.prioritization
19 import java.io.Serializable
21 object MessageActionConstants {
23 const val PRIORITIZE = "prioritize"
26 enum class MessageState(val id: String) {
30 PRIORITIZED("prioritized"),
31 AGGREGATED("aggregated"),
32 COMPLETED("completed"),
36 open class PrioritizationConfiguration : Serializable {
38 lateinit var expiryConfiguration: ExpiryConfiguration
39 lateinit var shutDownConfiguration: ShutDownConfiguration
40 lateinit var cleanConfiguration: CleanConfiguration
41 var kafkaConfiguration: KafkaConfiguration? = null // Optional Kafka Consumer Configuration
42 var natsConfiguration: NatsConfiguration? = null // Optional NATS Consumer Configuration
45 open class KafkaConfiguration : Serializable {
47 lateinit var inputTopicSelector: String // Consumer Configuration Selector
48 lateinit var expiredTopic: String // Publish Configuration Selector
49 lateinit var outputTopic: String // Publish Configuration Selector
52 open class NatsConfiguration : Serializable {
54 lateinit var connectionSelector: String // Consumer Configuration Selector
55 lateinit var inputSubject: String // Publish Configuration Selector
56 lateinit var expiredSubject: String // Publish Configuration Selector
57 lateinit var outputSubject: String // Publish Configuration Selector
60 open class ExpiryConfiguration : Serializable {
62 var frequencyMilli: Long = 30000L
63 var maxPollRecord: Int = 1000
66 open class ShutDownConfiguration : Serializable {
68 var waitMill: Long = 30000L
71 open class CleanConfiguration : Serializable {
73 var frequencyMilli: Long = 30000L
74 var expiredRecordsHoldDays: Int = 5
77 open class UpdateStateRequest : Serializable {
79 lateinit var id: String
80 var group: String? = null
81 var state: String? = null
84 data class CorrelationCheckResponse(
85 var message: String? = null,
86 var correlated: Boolean = false
89 data class TypeCorrelationKey(val type: String, val correlationId: String)