summaryrefslogtreecommitdiffstats
path: root/prh-dmaap-client/src
diff options
context:
space:
mode:
Diffstat (limited to 'prh-dmaap-client/src')
-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() {