Repository: camel
Updated Branches:
  refs/heads/camel-2.18.x 414df4ddd -> 8fcacfe22


Fixed component docs


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/8fcacfe2
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/8fcacfe2
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/8fcacfe2

Branch: refs/heads/camel-2.18.x
Commit: 8fcacfe22101fc35f04881f7436538da22399c80
Parents: 414df4d
Author: Claus Ibsen <davscl...@apache.org>
Authored: Thu Dec 15 17:24:52 2016 +0100
Committer: Claus Ibsen <davscl...@apache.org>
Committed: Thu Dec 15 17:26:48 2016 +0100

----------------------------------------------------------------------
 .../camel-ahc/src/main/docs/ahc-component.adoc       |  3 ++-
 .../org/apache/camel/component/ahc/AhcComponent.java | 10 +++++++++-
 .../org/apache/camel/component/ahc/AhcEndpoint.java  | 15 ++++++++++++++-
 3 files changed, 25 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/8fcacfe2/components/camel-ahc/src/main/docs/ahc-component.adoc
----------------------------------------------------------------------
diff --git a/components/camel-ahc/src/main/docs/ahc-component.adoc 
b/components/camel-ahc/src/main/docs/ahc-component.adoc
index f897c48..159e978 100644
--- a/components/camel-ahc/src/main/docs/ahc-component.adoc
+++ b/components/camel-ahc/src/main/docs/ahc-component.adoc
@@ -50,7 +50,7 @@ AhcEndpoint Options
 
 
 // endpoint options: START
-The AHC component supports 12 endpoint options which are listed below:
+The AHC component supports 13 endpoint options which are listed below:
 
 {% raw %}
 [width="100%",cols="2,1,1m,1m,5",options="header"]
@@ -67,6 +67,7 @@ The AHC component supports 12 endpoint options which are 
listed below:
 | clientConfig | advanced |  | AsyncHttpClientConfig | To configure the 
AsyncHttpClient to use a custom com.ning.http.client.AsyncHttpClientConfig 
instance.
 | clientConfigOptions | advanced |  | Map | To configure the 
AsyncHttpClientConfig using the key/values from the Map.
 | synchronous | advanced | false | boolean | Sets whether synchronous 
processing should be strictly used or Camel is allowed to use asynchronous 
processing (if supported).
+| clientConfigRealmOptions | security |  | Map | To configure the 
AsyncHttpClientConfig Realm using the key/values from the Map.
 | sslContextParameters | security |  | SSLContextParameters | Reference to a 
org.apache.camel.util.jsse.SSLContextParameters in the Registry. This reference 
overrides any configured SSLContextParameters at the component level. See Using 
the JSSE Configuration Utility. Note that configuring this option will override 
any SSL/TLS configuration options provided through the clientConfig option at 
the endpoint or component level.
 |=======================================================================
 {% endraw %}

http://git-wip-us.apache.org/repos/asf/camel/blob/8fcacfe2/components/camel-ahc/src/main/java/org/apache/camel/component/ahc/AhcComponent.java
----------------------------------------------------------------------
diff --git 
a/components/camel-ahc/src/main/java/org/apache/camel/component/ahc/AhcComponent.java
 
b/components/camel-ahc/src/main/java/org/apache/camel/component/ahc/AhcComponent.java
index 7a22dc0..2103070 100644
--- 
a/components/camel-ahc/src/main/java/org/apache/camel/component/ahc/AhcComponent.java
+++ 
b/components/camel-ahc/src/main/java/org/apache/camel/component/ahc/AhcComponent.java
@@ -17,6 +17,7 @@
 package org.apache.camel.component.ahc;
 
 import java.net.URI;
+import java.util.LinkedHashMap;
 import java.util.Map;
 
 import org.apache.camel.Endpoint;
@@ -70,7 +71,7 @@ public class AhcComponent extends 
HeaderFilterStrategyComponent {
         setProperties(endpoint, parameters);
 
         if (IntrospectionSupport.hasProperties(parameters, 
CLIENT_CONFIG_PREFIX)) {
-            DefaultAsyncHttpClientConfig.Builder builder = 
endpoint.getClientConfig() == null 
+            DefaultAsyncHttpClientConfig.Builder builder = 
endpoint.getClientConfig() == null
                     ? new DefaultAsyncHttpClientConfig.Builder() : 
AhcComponent.cloneConfig(endpoint.getClientConfig());
             
             if (endpoint.getClient() != null) {
@@ -94,6 +95,9 @@ public class AhcComponent extends 
HeaderFilterStrategyComponent {
                 // set and validate additional parameters on client config
                 Map<String, Object> realmParams = 
IntrospectionSupport.extractProperties(parameters, CLIENT_REALM_CONFIG_PREFIX);
 
+                // copy the parameters for the endpoint to have
+                endpoint.setClientConfigRealmOptions(new 
LinkedHashMap<>(realmParams));
+
                 Object principal = realmParams.remove("principal");
                 Object password = realmParams.remove("password");
 
@@ -111,6 +115,10 @@ public class AhcComponent extends 
HeaderFilterStrategyComponent {
             
             // set and validate additional parameters on client config
             Map<String, Object> clientParams = 
IntrospectionSupport.extractProperties(parameters, CLIENT_CONFIG_PREFIX);
+
+            // copy the parameters for the endpoint to have
+            endpoint.setClientConfigOptions(new LinkedHashMap<>(clientParams));
+
             setProperties(builder, clientParams);
             validateParameters(uri, clientParams, null);
 

http://git-wip-us.apache.org/repos/asf/camel/blob/8fcacfe2/components/camel-ahc/src/main/java/org/apache/camel/component/ahc/AhcEndpoint.java
----------------------------------------------------------------------
diff --git 
a/components/camel-ahc/src/main/java/org/apache/camel/component/ahc/AhcEndpoint.java
 
b/components/camel-ahc/src/main/java/org/apache/camel/component/ahc/AhcEndpoint.java
index 0afc438..302560e 100644
--- 
a/components/camel-ahc/src/main/java/org/apache/camel/component/ahc/AhcEndpoint.java
+++ 
b/components/camel-ahc/src/main/java/org/apache/camel/component/ahc/AhcEndpoint.java
@@ -66,8 +66,10 @@ public class AhcEndpoint extends DefaultEndpoint implements 
AsyncEndpoint, Heade
     private SSLContextParameters sslContextParameters;
     @UriParam(label = "advanced")
     private AsyncHttpClientConfig clientConfig;
-    @UriParam(label = "advanced", prefix = "asyncHttpClientConfig.", 
multiValue = true)
+    @UriParam(label = "advanced", prefix = "clientConfig.", multiValue = true)
     private Map<String, Object> clientConfigOptions;
+    @UriParam(label = "advanced,security", prefix = "clientConfig.realm.", 
multiValue = true)
+    private Map<String, Object> clientConfigRealmOptions;
     @UriParam(label = "producer", defaultValue = "false")
     private boolean connectionClose;
 
@@ -237,6 +239,17 @@ public class AhcEndpoint extends DefaultEndpoint 
implements AsyncEndpoint, Heade
         this.clientConfigOptions = clientConfigOptions;
     }
 
+    public Map<String, Object> getClientConfigRealmOptions() {
+        return clientConfigRealmOptions;
+    }
+
+    /**
+     * To configure the AsyncHttpClientConfig Realm using the key/values from 
the Map.
+     */
+    public void setClientConfigRealmOptions(Map<String, Object> 
clientConfigRealmOptions) {
+        this.clientConfigRealmOptions = clientConfigRealmOptions;
+    }
+
     public boolean isConnectionClose() {
         return connectionClose;
     }

Reply via email to