Camel component docs

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

Branch: refs/heads/camel-2.16.x
Commit: 9e91c334ec328cc301d4425219390f4311ee2f7e
Parents: 54f89a0
Author: Claus Ibsen <davscl...@apache.org>
Authored: Tue Jan 5 18:10:25 2016 +0100
Committer: Claus Ibsen <davscl...@apache.org>
Committed: Tue Jan 5 18:12:34 2016 +0100

----------------------------------------------------------------------
 .../camel/component/http/HttpComponent.java     | 12 ++++++---
 .../camel/component/http/HttpEndpoint.java      | 27 ++++++++++++++++++++
 2 files changed, 35 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/9e91c334/components/camel-http/src/main/java/org/apache/camel/component/http/HttpComponent.java
----------------------------------------------------------------------
diff --git 
a/components/camel-http/src/main/java/org/apache/camel/component/http/HttpComponent.java
 
b/components/camel-http/src/main/java/org/apache/camel/component/http/HttpComponent.java
index 104ff84..723b93e 100644
--- 
a/components/camel-http/src/main/java/org/apache/camel/component/http/HttpComponent.java
+++ 
b/components/camel-http/src/main/java/org/apache/camel/component/http/HttpComponent.java
@@ -213,14 +213,17 @@ public class HttpComponent extends HttpCommonComponent {
         UrlRewrite urlRewrite = resolveAndRemoveReferenceParameter(parameters, 
"urlRewrite", UrlRewrite.class);
         // http client can be configured from URI options
         HttpClientParams clientParams = new HttpClientParams();
-        IntrospectionSupport.setProperties(clientParams, parameters, 
"httpClient.");
+        Map<String, Object> httpClientOptions = 
IntrospectionSupport.extractProperties(parameters, "httpClient.");
+        IntrospectionSupport.setProperties(clientParams, httpClientOptions);
         // validate that we could resolve all httpClient. parameters as this 
component is lenient
-        validateParameters(uri, parameters, "httpClient.");       
+        validateParameters(uri, httpClientOptions, null);
         // http client can be configured from URI options
         HttpConnectionManagerParams connectionManagerParams = new 
HttpConnectionManagerParams();
         // setup the httpConnectionManagerParams
-        IntrospectionSupport.setProperties(connectionManagerParams, 
parameters, "httpConnectionManager.");
-        validateParameters(uri, parameters, "httpConnectionManager.");
+        Map<String, Object> httpConnectionManagerOptions = 
IntrospectionSupport.extractProperties(parameters, "httpConnectionManager.");
+        IntrospectionSupport.setProperties(connectionManagerParams, 
httpConnectionManagerOptions);
+        // validate that we could resolve all httpConnectionManager. 
parameters as this component is lenient
+        validateParameters(uri, httpConnectionManagerOptions, null);
         // make sure the component httpConnectionManager is take effect
         HttpConnectionManager thisHttpConnectionManager = 
httpConnectionManager;
         if (thisHttpConnectionManager == null) {
@@ -290,6 +293,7 @@ public class HttpComponent extends HttpCommonComponent {
             }
         }
         endpoint.setHttpUri(httpUri);
+        endpoint.setHttpClientOptions(httpClientOptions);
         return endpoint;
     }
 

http://git-wip-us.apache.org/repos/asf/camel/blob/9e91c334/components/camel-http/src/main/java/org/apache/camel/component/http/HttpEndpoint.java
----------------------------------------------------------------------
diff --git 
a/components/camel-http/src/main/java/org/apache/camel/component/http/HttpEndpoint.java
 
b/components/camel-http/src/main/java/org/apache/camel/component/http/HttpEndpoint.java
index 8a856e0..c3c0d48 100644
--- 
a/components/camel-http/src/main/java/org/apache/camel/component/http/HttpEndpoint.java
+++ 
b/components/camel-http/src/main/java/org/apache/camel/component/http/HttpEndpoint.java
@@ -21,6 +21,7 @@ import java.net.URISyntaxException;
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Map;
 
 import org.apache.camel.Consumer;
 import org.apache.camel.PollingConsumer;
@@ -53,7 +54,12 @@ public class HttpEndpoint extends HttpCommonEndpoint {
 
     @UriParam(label = "advanced")
     private HttpClientConfigurer httpClientConfigurer;
+    @UriParam(label = "advanced", prefix = "httpClient.", multiValue = true)
+    private Map<String, Object> httpClientOptions;
+    @UriParam(label = "advanced")
     private HttpConnectionManager httpConnectionManager;
+    @UriParam(label = "advanced", prefix = "httpConnectionManager.", 
multiValue = true)
+    private Map<String, Object> httpConnectionManagerOptions;
 
     public HttpEndpoint() {
     }
@@ -187,4 +193,25 @@ public class HttpEndpoint extends HttpCommonEndpoint {
         this.httpConnectionManager = httpConnectionManager;
     }
 
+    public Map<String, Object> getHttpClientOptions() {
+        return httpClientOptions;
+    }
+
+    /**
+     * To configure the HttpClient using the key/values from the Map.
+     */
+    public void setHttpClientOptions(Map<String, Object> httpClientOptions) {
+        this.httpClientOptions = httpClientOptions;
+    }
+
+    public Map<String, Object> getHttpConnectionManagerOptions() {
+        return httpConnectionManagerOptions;
+    }
+
+    /**
+     * To configure the HttpConnectionManager using the key/values from the 
Map.
+     */
+    public void setHttpConnectionManagerOptions(Map<String, Object> 
httpConnectionManagerOptions) {
+        this.httpConnectionManagerOptions = httpConnectionManagerOptions;
+    }
 }

Reply via email to