diff options
author | Betzer, Rony (rb844h) <rb844h@intl.att.com> | 2018-09-25 16:03:09 +0300 |
---|---|---|
committer | Betzer, Rony (rb844h) <rb844h@intl.att.com> | 2018-09-25 16:03:09 +0300 |
commit | 083ee56fa85a9217dc8bdffe98764d33c5851016 (patch) | |
tree | 537f0de07f1487413fc882f3186ee45ec055c6a1 /dcaedt_tools/src/main | |
parent | 79ca174176628a50b3178fd5dc527f15f3d63321 (diff) |
update code to latest - ammend previous commit
update code to latest - ammend previous commit
Change-Id: Ia4f55789689b5f2ddd004a4fe89a63f72cecc27f
Issue-ID: DCAEGEN2-819
Signed-off-by: Betzer, Rony (rb844h) <rb844h@intl.att.com>
Diffstat (limited to 'dcaedt_tools/src/main')
-rw-r--r-- | dcaedt_tools/src/main/java/utilities/DcaeRestClient.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/dcaedt_tools/src/main/java/utilities/DcaeRestClient.java b/dcaedt_tools/src/main/java/utilities/DcaeRestClient.java index ee6cdc7..4c992f5 100644 --- a/dcaedt_tools/src/main/java/utilities/DcaeRestClient.java +++ b/dcaedt_tools/src/main/java/utilities/DcaeRestClient.java @@ -13,6 +13,7 @@ import org.springframework.http.*; import org.springframework.http.client.HttpComponentsClientHttpRequestFactory; import org.springframework.stereotype.Component; import org.springframework.web.client.RestTemplate; +import tools.LoggerDebug; import javax.annotation.PostConstruct; import java.util.ArrayList; @@ -25,6 +26,7 @@ import java.util.stream.Stream; @Component("dcaerestclient") public class DcaeRestClient implements IDcaeRestClient { + private static LoggerDebug debugLogger = LoggerDebug.getInstance(); private static final String GET_RESOURCES_BY_CATEGORY = "/getResourcesByCategory"; private static final String CREATE_VFCMT = "/createVFCMT"; private static final String ELEMENTS = "/elements"; @@ -52,6 +54,7 @@ public class DcaeRestClient implements IDcaeRestClient { @Override public void init(Environment environment) { credential = environment.getCredential(); + debugLogger.log("Connecting to server host: " + environment.getDcaeBeHost() + ", port: " + environment.getDcaeBePort()); CloseableHttpClient httpClient = HttpClientBuilder.create().setDefaultHeaders(defaultHeaders(credential)).build(); HttpComponentsClientHttpRequestFactory requestFactory = new HttpComponentsClientHttpRequestFactory(); requestFactory.setHttpClient(httpClient); @@ -144,7 +147,9 @@ public class DcaeRestClient implements IDcaeRestClient { } private String buildRequestPath(String... args){ - return uri + Stream.of(args).collect(Collectors.joining()); + String url = uri + Stream.of(args).collect(Collectors.joining()); + debugLogger.log("Sending request: " + url); + return url; } @Override |