diff options
author | Krishnajinka <kris.jinka@samsung.com> | 2018-08-03 20:12:05 +0900 |
---|---|---|
committer | Krishnajinka <kris.jinka@samsung.com> | 2018-08-03 20:12:19 +0900 |
commit | 024f5d6cca5323d68b8116feecfb410f33459660 (patch) | |
tree | a4aeef04afa59e6c122546be00792c2252a5c41b /policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/internal/SingleThreadedUebTopicSource.java | |
parent | 6d662cb19aa858b743ab7e01d02a2a173abebcad (diff) |
Use builder in Bus DMaap UEB Topic constrctr
Constructors of the Bus Dmaap Ueb topic source class using many param
Refactor to use builder pattern for clean code implementation.
Issue-ID: POLICY-1017
Change-Id: Iea75b64ad232e83541a60a03a19cbb598c370cff
Signed-off-by: Krishnajinka <kris.jinka@samsung.com>
Diffstat (limited to 'policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/internal/SingleThreadedUebTopicSource.java')
-rw-r--r-- | policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/internal/SingleThreadedUebTopicSource.java | 23 |
1 files changed, 4 insertions, 19 deletions
diff --git a/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/internal/SingleThreadedUebTopicSource.java b/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/internal/SingleThreadedUebTopicSource.java index b7a20503..03273a2b 100644 --- a/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/internal/SingleThreadedUebTopicSource.java +++ b/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/internal/SingleThreadedUebTopicSource.java @@ -20,8 +20,6 @@ package org.onap.policy.common.endpoints.event.comm.bus.internal; -import java.util.List; - import org.onap.policy.common.endpoints.event.comm.Topic; import org.onap.policy.common.endpoints.event.comm.bus.UebTopicSource; @@ -33,29 +31,16 @@ public class SingleThreadedUebTopicSource extends SingleThreadedBusTopicSource i /** * - * @param servers UEB servers - * @param topic UEB Topic to be monitored - * @param apiKey UEB API Key (optional) - * @param apiSecret UEB API Secret (optional) - * @param consumerGroup UEB Reader Consumer Group - * @param consumerInstance UEB Reader Instance - * @param fetchTimeout UEB fetch timeout - * @param fetchLimit UEB fetch limit - * @param useHttps does topicSource use HTTPS? - * @param allowSelfSignedCerts does topicSource allow self-signed certs? - * + * @param busTopicParams Parameters object containing all the required inputs * * @throws IllegalArgumentException An invalid parameter passed in */ - public SingleThreadedUebTopicSource(List<String> servers, String topic, String apiKey, String apiSecret, - String consumerGroup, String consumerInstance, int fetchTimeout, int fetchLimit, boolean useHttps, - boolean allowSelfSignedCerts) { + public SingleThreadedUebTopicSource(BusTopicParams busTopicParams) { - super(servers, topic, apiKey, apiSecret, consumerGroup, consumerInstance, fetchTimeout, fetchLimit, useHttps, - allowSelfSignedCerts); + super(busTopicParams); - this.allowSelfSignedCerts = allowSelfSignedCerts; + this.allowSelfSignedCerts = busTopicParams.isAllowSelfSignedCerts(); this.init(); } |