diff options
author | Marcin Migdal <marcin.migdal@nokia.com> | 2019-02-26 16:04:55 +0100 |
---|---|---|
committer | Marcin Migdal <marcin.migdal@nokia.com> | 2019-02-27 14:04:31 +0100 |
commit | c5bc0a8afaa23c3732c25f1b3996dc2ace71fe82 (patch) | |
tree | 26a25485a1ddd8d81a1659bea1346a6d3dc0be87 /rest-services/dmaap-client/src | |
parent | bc386bcf22a1078a9e29db3faff63667a3b5c99d (diff) |
Remove Spring stuff from DMaaP
Change-Id: I68f4e1f398505b94053acb0999450b67906029b4
Issue-ID: DCAEGEN2-1245
Signed-off-by: Marcin Migdal <marcin.migdal@nokia.com>
Diffstat (limited to 'rest-services/dmaap-client/src')
-rw-r--r-- | rest-services/dmaap-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/dmaap/client/service/consumer/DMaaPConsumerReactiveHttpClient.java | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/rest-services/dmaap-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/dmaap/client/service/consumer/DMaaPConsumerReactiveHttpClient.java b/rest-services/dmaap-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/dmaap/client/service/consumer/DMaaPConsumerReactiveHttpClient.java index c6ac05bd..d92aef9c 100644 --- a/rest-services/dmaap-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/dmaap/client/service/consumer/DMaaPConsumerReactiveHttpClient.java +++ b/rest-services/dmaap-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/dmaap/client/service/consumer/DMaaPConsumerReactiveHttpClient.java @@ -28,17 +28,19 @@ import java.net.URI; import java.util.UUID; import java.util.function.Consumer; import org.onap.dcaegen2.services.sdk.rest.services.dmaap.client.config.DmaapConsumerConfiguration; +import org.onap.dcaegen2.services.sdk.rest.services.uri.URI.URIBuilder; import org.slf4j.MDC; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpStatus; import org.springframework.web.reactive.function.client.WebClient; -import org.springframework.web.util.DefaultUriBuilderFactory; import reactor.core.publisher.Mono; + /** * @author <a href="mailto:przemyslaw.wasala@nokia.com">Przemysław Wąsala</a> on 6/26/18 */ public class DMaaPConsumerReactiveHttpClient { + private final String dmaapHostName; private final String dmaapProtocol; private final Integer dmaapPortNumber; @@ -47,6 +49,7 @@ public class DMaaPConsumerReactiveHttpClient { private final String consumerId; private final String contentType; private final WebClient webClient; + private final static String SLASH="/"; /** * Constructor of DMaaPConsumerReactiveHttpClient. @@ -92,12 +95,12 @@ public class DMaaPConsumerReactiveHttpClient { } private String createRequestPath() { - return dmaapTopicName + "/" + consumerGroup + "/" + consumerId; + return new StringBuilder().append(SLASH).append(dmaapTopicName).append(SLASH).append(consumerGroup).append(SLASH).append(consumerId).toString(); } - URI getUri() { - return new DefaultUriBuilderFactory().builder().scheme(dmaapProtocol).host(dmaapHostName).port(dmaapPortNumber) - .path(createRequestPath()).build(); + return URI.create( + new URIBuilder().scheme(dmaapProtocol).host(dmaapHostName).port(dmaapPortNumber).path(createRequestPath()) + .build().toString()); } } |