Add webconfig for dmaap/rapp rest client 97/4497/1
authorecaiyanlinux <martin.c.yan@est.tech>
Sat, 1 Aug 2020 20:05:35 +0000 (22:05 +0200)
committerecaiyanlinux <martin.c.yan@est.tech>
Sun, 2 Aug 2020 13:21:30 +0000 (15:21 +0200)
Change-Id: I624858aa8373ffa98581706ebbce5fb5deed0e84
Signed-off-by: ecaiyanlinux <martin.c.yan@est.tech>
policy-agent/src/main/java/org/oransc/policyagent/clients/A1ClientFactory.java
policy-agent/src/main/java/org/oransc/policyagent/dmaap/DmaapMessageConsumer.java
policy-agent/src/main/java/org/oransc/policyagent/tasks/RicSynchronizationTask.java

index 3297b62..113abcb 100644 (file)
@@ -29,7 +29,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import reactor.core.publisher.Mono;
-
+import lombok.Getter;
 /**
  * Factory for A1 clients that supports four different protocol versions of the
  * A1 api.
@@ -38,6 +38,7 @@ public class A1ClientFactory {
 
     private static final Logger logger = LoggerFactory.getLogger(A1ClientFactory.class);
 
+    @Getter
     private final ApplicationConfig appConfig;
 
     @Autowired
index e141bab..d7d50a5 100644 (file)
@@ -150,7 +150,7 @@ public class DmaapMessageConsumer {
     protected DmaapMessageHandler getDmaapMessageHandler() throws IOException {
         if (this.dmaapMessageHandler == null) {
             String agentBaseUrl = "http://localhost:" + this.localServerHttpPort;
-            AsyncRestClient agentClient = new AsyncRestClient(agentBaseUrl);
+            AsyncRestClient agentClient = new AsyncRestClient(agentBaseUrl, this.applicationConfig.getWebClientConfig());
             AsyncRestClient producer = new AsyncRestClient(this.applicationConfig.getDmaapProducerTopicUrl(),
                 this.applicationConfig.getWebClientConfig());
             this.dmaapMessageHandler = new DmaapMessageHandler(producer, agentClient);
index 83c64e8..6ae55c4 100644 (file)
@@ -160,7 +160,7 @@ public class RicSynchronizationTask {
     }
 
     AsyncRestClient createNotificationClient(final String url) {
-        return new AsyncRestClient(url);
+        return new AsyncRestClient(url, this.a1ClientFactory.getAppConfig().getWebClientConfig());
     }
 
     private Flux<PolicyType> synchronizePolicyTypes(Ric ric, A1Client a1Client) {