From 3d77400558365d716f567248d189a474d0bc8fae Mon Sep 17 00:00:00 2001 From: Skip Wonnell Date: Fri, 15 Dec 2017 14:42:44 -0600 Subject: Adding new LCM features to the client lib Provide support for a new set of LCM actions to support an In-Place Software Upgrade flow which can be triggered by SO. Issues included: APPC-346, APPC-349 Issue-ID: APPC-346 Change-Id: I65c10035978aecb543b1102dd9c2dbd8374921bc Signed-off-by: Skip Wonnell --- .../java/org/onap/appc/client/impl/protocol/ConsumerImpl.java | 8 ++++++++ .../java/org/onap/appc/client/impl/protocol/ProducerImpl.java | 8 ++++++++ 2 files changed, 16 insertions(+) (limited to 'appc-client/client-lib') diff --git a/appc-client/client-lib/src/main/java/org/onap/appc/client/impl/protocol/ConsumerImpl.java b/appc-client/client-lib/src/main/java/org/onap/appc/client/impl/protocol/ConsumerImpl.java index 913f80f44..8fc678828 100644 --- a/appc-client/client-lib/src/main/java/org/onap/appc/client/impl/protocol/ConsumerImpl.java +++ b/appc-client/client-lib/src/main/java/org/onap/appc/client/impl/protocol/ConsumerImpl.java @@ -105,6 +105,14 @@ class ConsumerImpl implements Consumer { builder.usingHosts(hosts).onTopic(topic).knownAs(group, groupId); builder.withSocketTimeout(timeout + 5000).waitAtServer(timeout); builder.receivingAtMost(DEFAULT_LIMIT); + + //added for loop for defect 354330 + for (String url : hosts) { + if (url.contains("3905") || url.contains("https")) { + builder.usingHttps(true); + break; + } + } // Add credentials if provided if (authKey != null && authSecret != null) { diff --git a/appc-client/client-lib/src/main/java/org/onap/appc/client/impl/protocol/ProducerImpl.java b/appc-client/client-lib/src/main/java/org/onap/appc/client/impl/protocol/ProducerImpl.java index 7729db98d..b979c9d48 100644 --- a/appc-client/client-lib/src/main/java/org/onap/appc/client/impl/protocol/ProducerImpl.java +++ b/appc-client/client-lib/src/main/java/org/onap/appc/client/impl/protocol/ProducerImpl.java @@ -62,6 +62,14 @@ class ProducerImpl implements Producer { private CambriaBatchingPublisher getProducer() throws MalformedURLException, GeneralSecurityException { PublisherBuilder builder = new PublisherBuilder().usingHosts(hosts); + + //added for loop for defect 354330 + for (String url : hosts) { + if (url.contains("3905") || url.contains("https")) { + builder.usingHttps(true); + break; + } + } // Add credentials if provided if (authKey != null && authSecret != null) { -- cgit 1.2.3-korg