aboutsummaryrefslogtreecommitdiffstats
path: root/prh-aai-client
diff options
context:
space:
mode:
Diffstat (limited to 'prh-aai-client')
-rw-r--r--prh-aai-client/src/main/java/org/onap/dcaegen2/services/service/AAIClientImpl.java18
-rw-r--r--prh-aai-client/src/main/java/org/onap/dcaegen2/services/service/AAIConsumerClient.java14
-rw-r--r--prh-aai-client/src/main/java/org/onap/dcaegen2/services/service/AAIProducerClient.java14
3 files changed, 23 insertions, 23 deletions
diff --git a/prh-aai-client/src/main/java/org/onap/dcaegen2/services/service/AAIClientImpl.java b/prh-aai-client/src/main/java/org/onap/dcaegen2/services/service/AAIClientImpl.java
index f58919e5..785ff972 100644
--- a/prh-aai-client/src/main/java/org/onap/dcaegen2/services/service/AAIClientImpl.java
+++ b/prh-aai-client/src/main/java/org/onap/dcaegen2/services/service/AAIClientImpl.java
@@ -41,20 +41,20 @@ import java.security.NoSuchAlgorithmException;
public class AAIClientImpl implements AAIClient {
- Logger logger = LoggerFactory.getLogger(AAIClientImpl.class);
+ private Logger logger = LoggerFactory.getLogger(AAIClientImpl.class);
- private AAIClientConfiguration aaiHttpClientConfig;
+ private AAIClientConfiguration aaiClientConfig;
- public AAIClientImpl(AAIClientConfiguration aaiHttpClientConfiguration) {
- this.aaiHttpClientConfig = aaiHttpClientConfiguration;
+ public AAIClientImpl(AAIClientConfiguration aaiClientConfiguration) {
+ this.aaiClientConfig = aaiClientConfiguration;
}
@Override
public CloseableHttpClient getAAIHttpClient() {
final HttpClientBuilder httpClientBuilder = HttpClients.custom().useSystemProperties();
- final boolean aaiIgnoreSSLCertificateErrors = aaiHttpClientConfig.aaiIgnoreSSLCertificateErrors();
+ final boolean aaiIgnoreSSLCertificateErrors = aaiClientConfig.aaiIgnoreSSLCertificateErrors();
TrustStrategy acceptingTrustStrategy = (cert, authType) -> true;
@@ -72,14 +72,14 @@ public class AAIClientImpl implements AAIClient {
httpClientBuilder.setSSLHostnameVerifier(NoopHostnameVerifier.INSTANCE);
}
- final String aaiUserName = aaiHttpClientConfig.aaiUserName();
+ final String aaiUserName = aaiClientConfig.aaiUserName();
final CredentialsProvider credentialsProvider = new BasicCredentialsProvider();
if (aaiUserName != null) {
- final String aaiHost = aaiHttpClientConfig.aaiHost();
- final Integer aaiHostPortNumber = aaiHttpClientConfig.aaiHostPortNumber();
- final String aaiUserPassword = aaiHttpClientConfig.aaiUserPassword();
+ final String aaiHost = aaiClientConfig.aaiHost();
+ final Integer aaiHostPortNumber = aaiClientConfig.aaiHostPortNumber();
+ final String aaiUserPassword = aaiClientConfig.aaiUserPassword();
final AuthScope aaiHostPortAuthScope = new AuthScope(aaiHost, aaiHostPortNumber);
final Credentials aaiCredentials = new UsernamePasswordCredentials(aaiUserName, aaiUserPassword);
credentialsProvider.setCredentials(aaiHostPortAuthScope, aaiCredentials);
diff --git a/prh-aai-client/src/main/java/org/onap/dcaegen2/services/service/AAIConsumerClient.java b/prh-aai-client/src/main/java/org/onap/dcaegen2/services/service/AAIConsumerClient.java
index ffaf1aff..1bc7770c 100644
--- a/prh-aai-client/src/main/java/org/onap/dcaegen2/services/service/AAIConsumerClient.java
+++ b/prh-aai-client/src/main/java/org/onap/dcaegen2/services/service/AAIConsumerClient.java
@@ -52,13 +52,13 @@ public class AAIConsumerClient {
private final Map<String,String> aaiHeaders;
- public AAIConsumerClient(AAIClientConfiguration aaiHttpClientConfiguration) {
- closeableHttpClient = new AAIClientImpl(aaiHttpClientConfiguration).getAAIHttpClient();
- aaiHost = aaiHttpClientConfiguration.aaiHost();
- aaiProtocol = aaiHttpClientConfiguration.aaiProtocol();
- aaiHostPortNumber = aaiHttpClientConfiguration.aaiHostPortNumber();
- aaiPath = aaiHttpClientConfiguration.aaiBasePath() + aaiHttpClientConfiguration.aaiPnfPath();
- aaiHeaders = aaiHttpClientConfiguration.aaiHeaders();
+ public AAIConsumerClient(AAIClientConfiguration aaiClientConfiguration) {
+ closeableHttpClient = new AAIClientImpl(aaiClientConfiguration).getAAIHttpClient();
+ aaiHost = aaiClientConfiguration.aaiHost();
+ aaiProtocol = aaiClientConfiguration.aaiProtocol();
+ aaiHostPortNumber = aaiClientConfiguration.aaiHostPortNumber();
+ aaiPath = aaiClientConfiguration.aaiBasePath() + aaiClientConfiguration.aaiPnfPath();
+ aaiHeaders = aaiClientConfiguration.aaiHeaders();
}
public Optional<String> getHttpResponse(ConsumerDmaapModel consumerDmaapModel) throws IOException {
diff --git a/prh-aai-client/src/main/java/org/onap/dcaegen2/services/service/AAIProducerClient.java b/prh-aai-client/src/main/java/org/onap/dcaegen2/services/service/AAIProducerClient.java
index 788d997e..7f38d9ed 100644
--- a/prh-aai-client/src/main/java/org/onap/dcaegen2/services/service/AAIProducerClient.java
+++ b/prh-aai-client/src/main/java/org/onap/dcaegen2/services/service/AAIProducerClient.java
@@ -55,13 +55,13 @@ public class AAIProducerClient implements AAIExtendedHttpClient {
private final Map<String,String> aaiHeaders;
- public AAIProducerClient(AAIClientConfiguration aaiHttpClientConfiguration) {
- closeableHttpClient = new AAIClientImpl(aaiHttpClientConfiguration).getAAIHttpClient();
- aaiHost = aaiHttpClientConfiguration.aaiHost();
- aaiProtocol = aaiHttpClientConfiguration.aaiProtocol();
- aaiHostPortNumber = aaiHttpClientConfiguration.aaiHostPortNumber();
- aaiPath = aaiHttpClientConfiguration.aaiBasePath() + aaiHttpClientConfiguration.aaiPnfPath();
- aaiHeaders = aaiHttpClientConfiguration.aaiHeaders();
+ public AAIProducerClient(AAIClientConfiguration aaiClientConfiguration) {
+ closeableHttpClient = new AAIClientImpl(aaiClientConfiguration).getAAIHttpClient();
+ aaiHost = aaiClientConfiguration.aaiHost();
+ aaiProtocol = aaiClientConfiguration.aaiProtocol();
+ aaiHostPortNumber = aaiClientConfiguration.aaiHostPortNumber();
+ aaiPath = aaiClientConfiguration.aaiBasePath() + aaiClientConfiguration.aaiPnfPath();
+ aaiHeaders = aaiClientConfiguration.aaiHeaders();
}