summaryrefslogtreecommitdiffstats
path: root/prh-dmaap-client/src/main/java
diff options
context:
space:
mode:
authorwasala <przemyslaw.wasala@nokia.com>2018-04-12 13:37:41 +0200
committerwasala <przemyslaw.wasala@nokia.com>2018-04-12 14:29:12 +0200
commit3c2e8c9c4c32ad59be75a7500e628344c6dab5bf (patch)
tree98c4238f48612253435037c249e2929609933000 /prh-dmaap-client/src/main/java
parentda7aa97bebc796e898b9225d45a256f946d39f82 (diff)
Already added loading config for AAI and DMAAP
First of all we have defined a file in which we have pointer to configuration file for DMAAP and AAI After that added UT Change-Id: I7f9554a019b348a3460f5fa9d8dd3e4002a6686f Issue-ID: DCAEGEN2-407 Signed-off-by: wasala <przemyslaw.wasala@nokia.com>
Diffstat (limited to 'prh-dmaap-client/src/main/java')
-rw-r--r--prh-dmaap-client/src/main/java/org/onap/dcaegen2/services/config/DmaapConsumerConfiguration.java11
-rw-r--r--prh-dmaap-client/src/main/java/org/onap/dcaegen2/services/config/DmaapCustomConfig.java36
-rw-r--r--prh-dmaap-client/src/main/java/org/onap/dcaegen2/services/config/DmaapProducerConfiguration.java7
3 files changed, 37 insertions, 17 deletions
diff --git a/prh-dmaap-client/src/main/java/org/onap/dcaegen2/services/config/DmaapConsumerConfiguration.java b/prh-dmaap-client/src/main/java/org/onap/dcaegen2/services/config/DmaapConsumerConfiguration.java
index c4acf3af..9b322c9c 100644
--- a/prh-dmaap-client/src/main/java/org/onap/dcaegen2/services/config/DmaapConsumerConfiguration.java
+++ b/prh-dmaap-client/src/main/java/org/onap/dcaegen2/services/config/DmaapConsumerConfiguration.java
@@ -19,24 +19,31 @@
*/
package org.onap.dcaegen2.services.config;
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import org.immutables.value.Value;
+import org.springframework.stereotype.Component;
/**
* @author <a href="mailto:przemyslaw.wasala@nokia.com">Przemysław Wąsala</a> on 3/23/18
*/
+@Component
@Value.Immutable(prehash = true)
-@Value.Style(visibility = Value.Style.ImplementationVisibility.PACKAGE)
+@Value.Style(builder = "new")
+@JsonDeserialize(builder = ImmutableDmaapConsumerConfiguration.Builder.class)
public abstract class DmaapConsumerConfiguration implements DmaapCustomConfig {
private static final long serialVersionUID = 1L;
-
+ @Value.Parameter
abstract String consumerId();
+ @Value.Parameter
abstract String consumerGroup();
+ @Value.Parameter
abstract Integer timeoutMS();
+ @Value.Parameter
abstract Integer messageLimit();
diff --git a/prh-dmaap-client/src/main/java/org/onap/dcaegen2/services/config/DmaapCustomConfig.java b/prh-dmaap-client/src/main/java/org/onap/dcaegen2/services/config/DmaapCustomConfig.java
index ee849338..60df5b05 100644
--- a/prh-dmaap-client/src/main/java/org/onap/dcaegen2/services/config/DmaapCustomConfig.java
+++ b/prh-dmaap-client/src/main/java/org/onap/dcaegen2/services/config/DmaapCustomConfig.java
@@ -20,42 +20,50 @@
package org.onap.dcaegen2.services.config;
import java.io.Serializable;
+import org.immutables.value.Value;
/**
* @author <a href="mailto:przemyslaw.wasala@nokia.com">Przemysław Wąsala</a> on 3/28/18
*/
public interface DmaapCustomConfig extends Serializable {
- String dmmaphostName();
+ @Value.Parameter
+ String dmmapHostName();
- Integer dmmapportNumber();
+ @Value.Parameter
+ Integer dmmapPortNumber();
- String dmmaptopicName();
+ @Value.Parameter
+ String dmmapTopicName();
- String dmmapprotocol();
+ @Value.Parameter
+ String dmmapProtocol();
- String dmmapuserName();
+ @Value.Parameter
+ String dmmapUserName();
- String dmmapuserPassword();
+ @Value.Parameter
+ String dmmapUserPassword();
- String dmmapcontentType();
+ @Value.Parameter
+ String dmmapContentType();
interface Builder<T extends DmaapCustomConfig, B extends Builder<T, B>> {
- B dmmaphostName(String dmmaphostName);
+ B dmmapHostName(String dmmapHostName);
- B dmmapportNumber(Integer dmmapportNumber);
+ B dmmapPortNumber(Integer dmmapPortNumber);
- B dmmaptopicName(String dmmaptopicName);
+ B dmmapTopicName(String dmmapTopicName);
- B dmmapprotocol(String dmmapprotocol);
+ B dmmapProtocol(String dmmapProtocol);
- B dmmapuserName(String dmmapuserName);
+ B dmmapUserName(String dmmapUserName);
- B dmmapuserPassword(String dmmapuserPassword);
+ B dmmapUserPassword(String dmmapUserPassword);
- B dmmapcontentType(String dmmapcontentType);
+ B dmmapContentType(String dmmapContentType);
T build();
}
diff --git a/prh-dmaap-client/src/main/java/org/onap/dcaegen2/services/config/DmaapProducerConfiguration.java b/prh-dmaap-client/src/main/java/org/onap/dcaegen2/services/config/DmaapProducerConfiguration.java
index b63d68bd..99cbbca3 100644
--- a/prh-dmaap-client/src/main/java/org/onap/dcaegen2/services/config/DmaapProducerConfiguration.java
+++ b/prh-dmaap-client/src/main/java/org/onap/dcaegen2/services/config/DmaapProducerConfiguration.java
@@ -19,19 +19,24 @@
*/
package org.onap.dcaegen2.services.config;
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import org.immutables.value.Value;
+import org.springframework.stereotype.Component;
/**
* @author <a href="mailto:przemyslaw.wasala@nokia.com">Przemysław Wąsala</a> on 3/23/18
*/
+@Component
@Value.Immutable(prehash = true)
-@Value.Style(visibility = Value.Style.ImplementationVisibility.PACKAGE)
+@Value.Style(builder = "new")
+@JsonDeserialize(builder = ImmutableDmaapProducerConfiguration.Builder.class)
public abstract class DmaapProducerConfiguration implements DmaapCustomConfig {
private static final long serialVersionUID = 1L;
interface Builder extends
DmaapCustomConfig.Builder<DmaapProducerConfiguration, DmaapProducerConfiguration.Builder> {
+
}
public static DmaapProducerConfiguration.Builder builder() {