camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject camel git commit: Fixed component docs
Date Thu, 15 Dec 2016 16:25:03 GMT
Repository: camel
Updated Branches:
  refs/heads/master d18325656 -> e8a2b8ff5


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/e8a2b8ff
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/e8a2b8ff
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/e8a2b8ff

Branch: refs/heads/master
Commit: e8a2b8ff52bfafb0bbdf134832a7db908bef9e94
Parents: d183256
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Thu Dec 15 17:24:52 2016 +0100
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Thu Dec 15 17:24:52 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/e8a2b8ff/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 e058b88..2c9311d 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 13 endpoint options which are listed below:
+The AHC component supports 14 endpoint options which are listed below:
 
 {% raw %}
 [width="100%",cols="2,1,1m,1m,5",options="header"]
@@ -68,6 +68,7 @@ The AHC component supports 13 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/e8a2b8ff/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/e8a2b8ff/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 e56a7c5..6f93890 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
@@ -67,8 +67,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;
     @UriParam(label = "producer")
@@ -240,6 +242,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;
     }


Mime
View raw message