From: ecaiyanlinux Date: Sat, 1 Aug 2020 20:05:35 +0000 (+0200) Subject: Add webconfig for dmaap/rapp rest client X-Git-Tag: 2.0.1~4 X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F97%2F4497%2F1;p=nonrtric.git Add webconfig for dmaap/rapp rest client Change-Id: I624858aa8373ffa98581706ebbce5fb5deed0e84 Signed-off-by: ecaiyanlinux --- diff --git a/policy-agent/src/main/java/org/oransc/policyagent/clients/A1ClientFactory.java b/policy-agent/src/main/java/org/oransc/policyagent/clients/A1ClientFactory.java index 3297b622..113abcb6 100644 --- a/policy-agent/src/main/java/org/oransc/policyagent/clients/A1ClientFactory.java +++ b/policy-agent/src/main/java/org/oransc/policyagent/clients/A1ClientFactory.java @@ -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 diff --git a/policy-agent/src/main/java/org/oransc/policyagent/dmaap/DmaapMessageConsumer.java b/policy-agent/src/main/java/org/oransc/policyagent/dmaap/DmaapMessageConsumer.java index e141babd..d7d50a5e 100644 --- a/policy-agent/src/main/java/org/oransc/policyagent/dmaap/DmaapMessageConsumer.java +++ b/policy-agent/src/main/java/org/oransc/policyagent/dmaap/DmaapMessageConsumer.java @@ -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); diff --git a/policy-agent/src/main/java/org/oransc/policyagent/tasks/RicSynchronizationTask.java b/policy-agent/src/main/java/org/oransc/policyagent/tasks/RicSynchronizationTask.java index 83c64e89..6ae55c46 100644 --- a/policy-agent/src/main/java/org/oransc/policyagent/tasks/RicSynchronizationTask.java +++ b/policy-agent/src/main/java/org/oransc/policyagent/tasks/RicSynchronizationTask.java @@ -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 synchronizePolicyTypes(Ric ric, A1Client a1Client) {