diff options
author | Marcin Migdal <marcin.migdal@nokia.com> | 2019-03-19 13:14:24 +0100 |
---|---|---|
committer | Marcin Migdal <marcin.migdal@nokia.com> | 2019-03-19 13:14:24 +0100 |
commit | 7abe2954d3783cb8a6484f012507be95d59c82b9 (patch) | |
tree | 2c7f414a9d1ed4c38f868807e5378c99c27c3458 /rest-services/dmaap-client/src/main | |
parent | c852448b1e6ca5e28e0b0dab26c2af3d5af3f390 (diff) |
Change CloudHttpClient API parse Array
Change-Id: I1127ab28ee4f0e482540829f26acfc1bc8f5667c
Issue-ID: DCAEGEN2-1310
Signed-off-by: mmigdal <marcin.migdal@nokia.com>
Signed-off-by: Marcin Migdal <marcin.migdal@nokia.com>
Diffstat (limited to 'rest-services/dmaap-client/src/main')
-rw-r--r-- | rest-services/dmaap-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/dmaap/client/service/consumer/DMaaPConsumerReactiveHttpClient.java | 7 |
1 files changed, 4 insertions, 3 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 d0f95f6e..b37ac3dc 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 @@ -20,6 +20,7 @@ package org.onap.dcaegen2.services.sdk.rest.services.dmaap.client.service.consumer; +import com.google.gson.JsonArray; import java.net.URI; import java.util.Map; import java.util.Optional; @@ -59,15 +60,15 @@ public class DMaaPConsumerReactiveHttpClient extends DMaaPAbstractReactiveHttpCl * * @return reactive response from DMaaP in string format */ - public Mono<String> getDMaaPConsumerResponse(Optional<RequestDiagnosticContext> requestDiagnosticContextOptional) { + public Mono<JsonArray> getDMaaPConsumerResponse(Optional<RequestDiagnosticContext> requestDiagnosticContextOptional) { Map<String,String> headers = DMaaPClientServiceUtils.getHeaders(consumerConfiguration.dmaapContentType()); if (requestDiagnosticContextOptional.isPresent()) { return cloudHttpClient - .get(getUri().toString(), requestDiagnosticContextOptional.get(), headers, String.class); + .get(getUri().toString(), requestDiagnosticContextOptional.get(), headers, JsonArray.class); } RequestDiagnosticContext requestDiagnosticContext = ImmutableRequestDiagnosticContext.builder() .invocationId(UUID.randomUUID()).requestId(UUID.randomUUID()).build(); - return cloudHttpClient.get(getUri().toString(), requestDiagnosticContext, headers, String.class); + return cloudHttpClient.get(getUri().toString(), requestDiagnosticContext, headers, JsonArray.class); } URI getUri() { |