summaryrefslogtreecommitdiff
path: root/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/http/HttpClientFactory.java
diff options
context:
space:
mode:
authorThomas <>2022-04-19 08:12:11 +0200
committerThomas <>2022-04-19 08:14:02 +0200
commit7a4ce221f2c67235604f7986ea77fccb64f6764f (patch)
treecb7cb6b6530eeecf71bc3b50ee3ade4f03cb038d /eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/http/HttpClientFactory.java
parentc0ae73a8446b25b6e9ba1a96c084047603464d2b (diff)
downloadEAAF-Components-7a4ce221f2c67235604f7986ea77fccb64f6764f.tar.gz
EAAF-Components-7a4ce221f2c67235604f7986ea77fccb64f6764f.tar.bz2
EAAF-Components-7a4ce221f2c67235604f7986ea77fccb64f6764f.zip
feat(http): add request interceptor configuration into Apache HTTP Client factory
Diffstat (limited to 'eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/http/HttpClientFactory.java')
-rw-r--r--eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/http/HttpClientFactory.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/http/HttpClientFactory.java b/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/http/HttpClientFactory.java
index 07522b56..784dbe0e 100644
--- a/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/http/HttpClientFactory.java
+++ b/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/http/HttpClientFactory.java
@@ -158,6 +158,14 @@ public class HttpClientFactory implements IHttpClientFactory {
HttpClientConnectionManager connectionManager
= injectConnectionManager(builder, sslConnectionFactory);
+ // set interceptor
+ if (config.getMessageInterceptors() != null) {
+ for (int i = config.getMessageInterceptors().size() - 1; i >= 0; i--) {
+ builder.addInterceptorFirst(config.getMessageInterceptors().get(i));
+
+ }
+ }
+
availableBuilders.put(config.getUuid(), Pair.newInstance(builder, connectionManager));
}