X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=dcae-analytics-dmaap%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fdcae%2Fapod%2Fanalytics%2Fdmaap%2Fdomain%2Fconfig%2FDMaaPMRPublisherConfig.java;fp=dcae-analytics-dmaap%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fdcae%2Fapod%2Fanalytics%2Fdmaap%2Fdomain%2Fconfig%2FDMaaPMRPublisherConfig.java;h=e5e67e63ec57679106467bee93e536d719f0d236;hb=274a2398e0fd209c5589979beb3c4d339e592d80;hp=8dfc2897887306928a08843216c57e11c6588425;hpb=032a765013bf6b0e23aca59aac2343c2d1903aec;p=dcaegen2%2Fanalytics%2Ftca.git diff --git a/dcae-analytics-dmaap/src/main/java/org/onap/dcae/apod/analytics/dmaap/domain/config/DMaaPMRPublisherConfig.java b/dcae-analytics-dmaap/src/main/java/org/onap/dcae/apod/analytics/dmaap/domain/config/DMaaPMRPublisherConfig.java index 8dfc289..e5e67e6 100644 --- a/dcae-analytics-dmaap/src/main/java/org/onap/dcae/apod/analytics/dmaap/domain/config/DMaaPMRPublisherConfig.java +++ b/dcae-analytics-dmaap/src/main/java/org/onap/dcae/apod/analytics/dmaap/domain/config/DMaaPMRPublisherConfig.java @@ -47,24 +47,16 @@ public class DMaaPMRPublisherConfig extends DMaaPMRBaseConfig { private int maxRecoveryQueueSize; - private DMaaPMRPublisherConfig(@Nonnull String hostName, - @Nonnull Integer portNumber, - @Nonnull String topicName, - @Nonnull String protocol, - String userName, - String userPassword, - @Nonnull String contentType, - int maxBatchSize, - int maxRecoveryQueueSize) { - this.hostName = hostName; - this.portNumber = portNumber; - this.topicName = topicName; - this.protocol = protocol; - this.userName = userName; - this.userPassword = userPassword; - this.contentType = contentType; - this.maxBatchSize = maxBatchSize; - this.maxRecoveryQueueSize = maxRecoveryQueueSize; + private DMaaPMRPublisherConfig(Builder builder) { + this.hostName = builder.hostName; + this.portNumber = builder.portNumber; + this.topicName = builder.topicName; + this.protocol = builder.protocol; + this.userName = builder.userName; + this.userPassword = builder.userPassword; + this.contentType = builder.contentType; + this.maxBatchSize = builder.maxBatchSize; + this.maxRecoveryQueueSize = builder.maxRecoveryQueueSize; } @@ -189,8 +181,7 @@ public class DMaaPMRPublisherConfig extends DMaaPMRBaseConfig { * @return Builds and returns thread safe, immutable {@link DMaaPMRPublisherConfig} object */ public DMaaPMRPublisherConfig build() { - return new DMaaPMRPublisherConfig(hostName, portNumber, topicName, protocol, userName, userPassword, - contentType, maxBatchSize, maxRecoveryQueueSize); + return new DMaaPMRPublisherConfig(this); } }