aboutsummaryrefslogtreecommitdiffstats
path: root/prh-dmaap-client/src/main/java/org/onap/dcaegen2/services/prh/service/producer/DMaaPPublisherReactiveHttpClient.java
diff options
context:
space:
mode:
authorpkaras <piotr.karas@nokia.com>2018-11-05 16:04:54 +0100
committerpkaras <piotr.karas@nokia.com>2018-11-05 16:10:17 +0100
commite8a80102a45458b3f1d15e07dc0a63e1370c44a7 (patch)
tree374b4fc2d3b7577da8612ab92998f0e25090f147 /prh-dmaap-client/src/main/java/org/onap/dcaegen2/services/prh/service/producer/DMaaPPublisherReactiveHttpClient.java
parent600c05b1530c120b34370e86e92dfd79421474fe (diff)
DmaaP Publisher and consumer interfaces ssl setup
Change-Id: I971d0fb222c6e8e15de4fc4a4d9eeb4ef3a99f44 Issue-ID: DCAEGEN2-944 Signed-off-by: piotr.karas <piotr.karas@nokia.com>
Diffstat (limited to 'prh-dmaap-client/src/main/java/org/onap/dcaegen2/services/prh/service/producer/DMaaPPublisherReactiveHttpClient.java')
-rw-r--r--prh-dmaap-client/src/main/java/org/onap/dcaegen2/services/prh/service/producer/DMaaPPublisherReactiveHttpClient.java12
1 files changed, 4 insertions, 8 deletions
diff --git a/prh-dmaap-client/src/main/java/org/onap/dcaegen2/services/prh/service/producer/DMaaPPublisherReactiveHttpClient.java b/prh-dmaap-client/src/main/java/org/onap/dcaegen2/services/prh/service/producer/DMaaPPublisherReactiveHttpClient.java
index 6919487a..d4687c51 100644
--- a/prh-dmaap-client/src/main/java/org/onap/dcaegen2/services/prh/service/producer/DMaaPPublisherReactiveHttpClient.java
+++ b/prh-dmaap-client/src/main/java/org/onap/dcaegen2/services/prh/service/producer/DMaaPPublisherReactiveHttpClient.java
@@ -50,20 +50,21 @@ public class DMaaPPublisherReactiveHttpClient {
private final String dmaapProtocol;
private final String dmaapTopicName;
private final String dmaapContentType;
-
- private RestTemplate restTemplate;
+ private final RestTemplate restTemplate;
/**
* Constructor DMaaPPublisherReactiveHttpClient.
*
* @param dmaapPublisherConfiguration - DMaaP producer configuration object
*/
- public DMaaPPublisherReactiveHttpClient(DmaapPublisherConfiguration dmaapPublisherConfiguration) {
+ DMaaPPublisherReactiveHttpClient(DmaapPublisherConfiguration dmaapPublisherConfiguration,
+ RestTemplate restTemplate) {
this.dmaapHostName = dmaapPublisherConfiguration.dmaapHostName();
this.dmaapProtocol = dmaapPublisherConfiguration.dmaapProtocol();
this.dmaapPortNumber = dmaapPublisherConfiguration.dmaapPortNumber();
this.dmaapTopicName = dmaapPublisherConfiguration.dmaapTopicName();
this.dmaapContentType = dmaapPublisherConfiguration.dmaapContentType();
+ this.restTemplate = restTemplate;
}
/**
@@ -90,11 +91,6 @@ public class DMaaPPublisherReactiveHttpClient {
}
- public DMaaPPublisherReactiveHttpClient createDMaaPWebClient(RestTemplate restTemplate) {
- this.restTemplate = restTemplate;
- return this;
- }
-
URI getUri() {
return new DefaultUriBuilderFactory().builder().scheme(dmaapProtocol).host(dmaapHostName).port(dmaapPortNumber)
.path(dmaapTopicName).build();