You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2016/01/05 18:13:56 UTC

[1/6] camel git commit: Camel component docs

Repository: camel
Updated Branches:
  refs/heads/camel-2.16.x af14ebfce -> 9e91c334e
  refs/heads/master 6ad29b2ec -> a4aeefef5


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

Branch: refs/heads/master
Commit: 1795520fef21791531d59f3b01d810160242803f
Parents: 6ad29b2
Author: Claus Ibsen <da...@apache.org>
Authored: Tue Jan 5 17:58:50 2016 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Tue Jan 5 17:58:50 2016 +0100

----------------------------------------------------------------------
 .../camel/http/common/HttpCommonEndpoint.java   | 30 +++++++++++++-------
 .../apache/camel/http/common/HttpConsumer.java  |  2 +-
 .../apache/camel/http/common/HttpMessage.java   |  4 +--
 .../http/HttpReferenceParameterTest.java        |  4 +--
 4 files changed, 25 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/1795520f/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpCommonEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpCommonEndpoint.java b/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpCommonEndpoint.java
index 22b9017..2856c48 100644
--- a/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpCommonEndpoint.java
+++ b/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpCommonEndpoint.java
@@ -37,7 +37,7 @@ public abstract class HttpCommonEndpoint extends DefaultEndpoint implements Head
     @UriParam(description = "To use a custom HeaderFilterStrategy to filter header to and from Camel message.")
     HeaderFilterStrategy headerFilterStrategy = new HttpHeaderFilterStrategy();
     @UriParam(description = "To use a custom HttpBinding to control the mapping between Camel message and HttpClient.")
-    HttpBinding binding;
+    HttpBinding httpBinding;
     @UriParam(label = "producer", defaultValue = "true",
             description = "Option to disable throwing the HttpOperationFailedException in case of failed responses from the remote server."
                     + " This allows you to get all responses regardless of the HTTP status code.")
@@ -138,25 +138,35 @@ public abstract class HttpCommonEndpoint extends DefaultEndpoint implements Head
     // Properties
     //-------------------------------------------------------------------------
 
+    @Deprecated
     public HttpBinding getBinding() {
-        if (binding == null) {
+        return httpBinding;
+    }
+
+    @Deprecated
+    public void setBinding(HttpBinding httpBinding) {
+        setHttpBinding(httpBinding);
+    }
+
+    public HttpBinding getHttpBinding() {
+        if (httpBinding == null) {
             // create a new binding and use the options from this endpoint
-            binding = new DefaultHttpBinding();
-            binding.setHeaderFilterStrategy(getHeaderFilterStrategy());
-            binding.setTransferException(isTransferException());
+            httpBinding = new DefaultHttpBinding();
+            httpBinding.setHeaderFilterStrategy(getHeaderFilterStrategy());
+            httpBinding.setTransferException(isTransferException());
             if (getComponent() != null) {
-                binding.setAllowJavaSerializedObject(getComponent().isAllowJavaSerializedObject());
+                httpBinding.setAllowJavaSerializedObject(getComponent().isAllowJavaSerializedObject());
             }
-            binding.setEagerCheckContentAvailable(isEagerCheckContentAvailable());
+            httpBinding.setEagerCheckContentAvailable(isEagerCheckContentAvailable());
         }
-        return binding;
+        return httpBinding;
     }
 
     /**
      * To use a custom HttpBinding to control the mapping between Camel message and HttpClient.
      */
-    public void setBinding(HttpBinding binding) {
-        this.binding = binding;
+    public void setHttpBinding(HttpBinding httpBinding) {
+        this.httpBinding = httpBinding;
     }
 
     public String getPath() {

http://git-wip-us.apache.org/repos/asf/camel/blob/1795520f/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpConsumer.java
----------------------------------------------------------------------
diff --git a/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpConsumer.java b/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpConsumer.java
index f389081..3a2da8e 100644
--- a/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpConsumer.java
+++ b/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpConsumer.java
@@ -37,7 +37,7 @@ public class HttpConsumer extends DefaultConsumer implements SuspendableService
     }
 
     public HttpBinding getBinding() {
-        return getEndpoint().getBinding();
+        return getEndpoint().getHttpBinding();
     }
 
     public String getPath() {

http://git-wip-us.apache.org/repos/asf/camel/blob/1795520f/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpMessage.java
----------------------------------------------------------------------
diff --git a/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpMessage.java b/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpMessage.java
index b2f4527..a56f886 100644
--- a/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpMessage.java
+++ b/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpMessage.java
@@ -49,7 +49,7 @@ public class HttpMessage extends DefaultMessage {
 
         // use binding to read the request allowing end users to use their
         // implementation of the binding
-        getEndpoint().getBinding().readRequest(request, this);
+        getEndpoint().getHttpBinding().readRequest(request, this);
     }
 
     public HttpServletRequest getRequest() {
@@ -63,7 +63,7 @@ public class HttpMessage extends DefaultMessage {
     @Override
     protected Object createBody() {
         try {
-            return getEndpoint().getBinding().parseBody(this);
+            return getEndpoint().getHttpBinding().parseBody(this);
         } catch (IOException e) {
             throw new RuntimeCamelException(e);
         }

http://git-wip-us.apache.org/repos/asf/camel/blob/1795520f/components/camel-http/src/test/java/org/apache/camel/component/http/HttpReferenceParameterTest.java
----------------------------------------------------------------------
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpReferenceParameterTest.java b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpReferenceParameterTest.java
index 82ab548..ce88dfe 100644
--- a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpReferenceParameterTest.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpReferenceParameterTest.java
@@ -29,7 +29,7 @@ import org.junit.Test;
 public class HttpReferenceParameterTest extends CamelTestSupport {
 
     private static final String TEST_URI_1 = "http://localhost:8080?httpBinding=#customBinding&httpClientConfigurer=#customConfigurer";
-    private static final String TEST_URI_2 = "http://localhost:8081?httpBinding=customBinding&httpClientConfigurer=customConfigurer";
+    private static final String TEST_URI_2 = "http://localhost:8081?httpBinding=#customBinding&httpClientConfigurer=#customConfigurer";
     
     private HttpEndpoint endpoint1;
     private HttpEndpoint endpoint2;
@@ -53,7 +53,7 @@ public class HttpReferenceParameterTest extends CamelTestSupport {
     }
 
     @Test
-    public void testHttpClientConfigurerRef() {
+    public void testHttpClientConfigurer() {
         assertSame(testConfigurer, endpoint1.getHttpClientConfigurer());
         assertSame(testConfigurer, endpoint2.getHttpClientConfigurer());
     }


[5/6] camel git commit: Camel component docs

Posted by da...@apache.org.
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/54f89a0f
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/54f89a0f
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/54f89a0f

Branch: refs/heads/camel-2.16.x
Commit: 54f89a0f8d630ff8968f987fe7f046f650b4d558
Parents: 00d62d3
Author: Claus Ibsen <da...@apache.org>
Authored: Tue Jan 5 18:00:23 2016 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Tue Jan 5 18:12:27 2016 +0100

----------------------------------------------------------------------
 .../main/java/org/apache/camel/component/http/HttpEndpoint.java   | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/54f89a0f/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 6d6704c..8a856e0 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
@@ -28,6 +28,7 @@ import org.apache.camel.Processor;
 import org.apache.camel.Producer;
 import org.apache.camel.http.common.HttpCommonEndpoint;
 import org.apache.camel.spi.UriEndpoint;
+import org.apache.camel.spi.UriParam;
 import org.apache.camel.util.ObjectHelper;
 import org.apache.commons.httpclient.HttpClient;
 import org.apache.commons.httpclient.HttpConnectionManager;
@@ -49,6 +50,8 @@ public class HttpEndpoint extends HttpCommonEndpoint {
     private static final Logger LOG = LoggerFactory.getLogger(HttpEndpoint.class);
 
     private HttpClientParams clientParams;
+
+    @UriParam(label = "advanced")
     private HttpClientConfigurer httpClientConfigurer;
     private HttpConnectionManager httpConnectionManager;
 


[4/6] camel git commit: Camel component docs

Posted by da...@apache.org.
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/00d62d3a
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/00d62d3a
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/00d62d3a

Branch: refs/heads/camel-2.16.x
Commit: 00d62d3a77fb9989aba9cc1f254bf49f2eeba42b
Parents: af14ebf
Author: Claus Ibsen <da...@apache.org>
Authored: Tue Jan 5 17:58:50 2016 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Tue Jan 5 18:12:17 2016 +0100

----------------------------------------------------------------------
 .../camel/http/common/HttpCommonEndpoint.java   | 30 +++++++++++++-------
 .../apache/camel/http/common/HttpConsumer.java  |  2 +-
 .../apache/camel/http/common/HttpMessage.java   |  4 +--
 .../http/HttpReferenceParameterTest.java        |  8 +++---
 4 files changed, 27 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/00d62d3a/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpCommonEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpCommonEndpoint.java b/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpCommonEndpoint.java
index 22b9017..2856c48 100644
--- a/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpCommonEndpoint.java
+++ b/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpCommonEndpoint.java
@@ -37,7 +37,7 @@ public abstract class HttpCommonEndpoint extends DefaultEndpoint implements Head
     @UriParam(description = "To use a custom HeaderFilterStrategy to filter header to and from Camel message.")
     HeaderFilterStrategy headerFilterStrategy = new HttpHeaderFilterStrategy();
     @UriParam(description = "To use a custom HttpBinding to control the mapping between Camel message and HttpClient.")
-    HttpBinding binding;
+    HttpBinding httpBinding;
     @UriParam(label = "producer", defaultValue = "true",
             description = "Option to disable throwing the HttpOperationFailedException in case of failed responses from the remote server."
                     + " This allows you to get all responses regardless of the HTTP status code.")
@@ -138,25 +138,35 @@ public abstract class HttpCommonEndpoint extends DefaultEndpoint implements Head
     // Properties
     //-------------------------------------------------------------------------
 
+    @Deprecated
     public HttpBinding getBinding() {
-        if (binding == null) {
+        return httpBinding;
+    }
+
+    @Deprecated
+    public void setBinding(HttpBinding httpBinding) {
+        setHttpBinding(httpBinding);
+    }
+
+    public HttpBinding getHttpBinding() {
+        if (httpBinding == null) {
             // create a new binding and use the options from this endpoint
-            binding = new DefaultHttpBinding();
-            binding.setHeaderFilterStrategy(getHeaderFilterStrategy());
-            binding.setTransferException(isTransferException());
+            httpBinding = new DefaultHttpBinding();
+            httpBinding.setHeaderFilterStrategy(getHeaderFilterStrategy());
+            httpBinding.setTransferException(isTransferException());
             if (getComponent() != null) {
-                binding.setAllowJavaSerializedObject(getComponent().isAllowJavaSerializedObject());
+                httpBinding.setAllowJavaSerializedObject(getComponent().isAllowJavaSerializedObject());
             }
-            binding.setEagerCheckContentAvailable(isEagerCheckContentAvailable());
+            httpBinding.setEagerCheckContentAvailable(isEagerCheckContentAvailable());
         }
-        return binding;
+        return httpBinding;
     }
 
     /**
      * To use a custom HttpBinding to control the mapping between Camel message and HttpClient.
      */
-    public void setBinding(HttpBinding binding) {
-        this.binding = binding;
+    public void setHttpBinding(HttpBinding httpBinding) {
+        this.httpBinding = httpBinding;
     }
 
     public String getPath() {

http://git-wip-us.apache.org/repos/asf/camel/blob/00d62d3a/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpConsumer.java
----------------------------------------------------------------------
diff --git a/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpConsumer.java b/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpConsumer.java
index f389081..3a2da8e 100644
--- a/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpConsumer.java
+++ b/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpConsumer.java
@@ -37,7 +37,7 @@ public class HttpConsumer extends DefaultConsumer implements SuspendableService
     }
 
     public HttpBinding getBinding() {
-        return getEndpoint().getBinding();
+        return getEndpoint().getHttpBinding();
     }
 
     public String getPath() {

http://git-wip-us.apache.org/repos/asf/camel/blob/00d62d3a/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpMessage.java
----------------------------------------------------------------------
diff --git a/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpMessage.java b/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpMessage.java
index b2f4527..a56f886 100644
--- a/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpMessage.java
+++ b/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpMessage.java
@@ -49,7 +49,7 @@ public class HttpMessage extends DefaultMessage {
 
         // use binding to read the request allowing end users to use their
         // implementation of the binding
-        getEndpoint().getBinding().readRequest(request, this);
+        getEndpoint().getHttpBinding().readRequest(request, this);
     }
 
     public HttpServletRequest getRequest() {
@@ -63,7 +63,7 @@ public class HttpMessage extends DefaultMessage {
     @Override
     protected Object createBody() {
         try {
-            return getEndpoint().getBinding().parseBody(this);
+            return getEndpoint().getHttpBinding().parseBody(this);
         } catch (IOException e) {
             throw new RuntimeCamelException(e);
         }

http://git-wip-us.apache.org/repos/asf/camel/blob/00d62d3a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpReferenceParameterTest.java
----------------------------------------------------------------------
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpReferenceParameterTest.java b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpReferenceParameterTest.java
index 5e93ee3..1313800 100644
--- a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpReferenceParameterTest.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpReferenceParameterTest.java
@@ -28,9 +28,9 @@ import org.junit.Test;
  */
 public class HttpReferenceParameterTest extends CamelTestSupport {
 
-    private static final String TEST_URI_1 = "http://localhost:8080?httpBindingRef=#customBinding&httpClientConfigurerRef=#customConfigurer";
-    private static final String TEST_URI_2 = "http://localhost:8081?httpBindingRef=customBinding&httpClientConfigurerRef=customConfigurer";
-    
+    private static final String TEST_URI_1 = "http://localhost:8080?httpBinding=#customBinding&httpClientConfigurer=#customConfigurer";
+    private static final String TEST_URI_2 = "http://localhost:8081?httpBinding=#customBinding&httpClientConfigurer=#customConfigurer";
+
     private HttpEndpoint endpoint1;
     private HttpEndpoint endpoint2;
     
@@ -53,7 +53,7 @@ public class HttpReferenceParameterTest extends CamelTestSupport {
     }
 
     @Test
-    public void testHttpClientConfigurerRef() {
+    public void testHttpClientConfigurer() {
         assertSame(testConfigurer, endpoint1.getHttpClientConfigurer());
         assertSame(testConfigurer, endpoint2.getHttpClientConfigurer());
     }


[3/6] camel git commit: Camel component docs

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

Branch: refs/heads/master
Commit: a4aeefef5a1b48168026837d662a0a2e24e3f667
Parents: 28b096a
Author: Claus Ibsen <da...@apache.org>
Authored: Tue Jan 5 18:10:25 2016 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Tue Jan 5 18:10:25 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/a4aeefef/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 3106f2d..9caa8cc 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
@@ -203,14 +203,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) {
@@ -280,6 +283,7 @@ public class HttpComponent extends HttpCommonComponent {
             }
         }
         endpoint.setHttpUri(httpUri);
+        endpoint.setHttpClientOptions(httpClientOptions);
         return endpoint;
     }
 

http://git-wip-us.apache.org/repos/asf/camel/blob/a4aeefef/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 b7ff65b..153774b 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;
@@ -51,7 +52,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() {
     }
@@ -185,4 +191,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;
+    }
 }


[6/6] camel git commit: Camel component docs

Posted by da...@apache.org.
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 <da...@apache.org>
Authored: Tue Jan 5 18:10:25 2016 +0100
Committer: Claus Ibsen <da...@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;
+    }
 }


[2/6] camel git commit: Camel component docs

Posted by da...@apache.org.
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/28b096a5
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/28b096a5
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/28b096a5

Branch: refs/heads/master
Commit: 28b096a5ada5f5e220615d18eb58566185cdc38a
Parents: 1795520
Author: Claus Ibsen <da...@apache.org>
Authored: Tue Jan 5 18:00:23 2016 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Tue Jan 5 18:00:23 2016 +0100

----------------------------------------------------------------------
 .../main/java/org/apache/camel/component/http/HttpEndpoint.java   | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/28b096a5/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 bf6be3c..b7ff65b 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
@@ -28,6 +28,7 @@ import org.apache.camel.Processor;
 import org.apache.camel.Producer;
 import org.apache.camel.http.common.HttpCommonEndpoint;
 import org.apache.camel.spi.UriEndpoint;
+import org.apache.camel.spi.UriParam;
 import org.apache.camel.util.ObjectHelper;
 import org.apache.commons.httpclient.HttpClient;
 import org.apache.commons.httpclient.HttpConnectionManager;
@@ -47,6 +48,8 @@ public class HttpEndpoint extends HttpCommonEndpoint {
     private static final Logger LOG = LoggerFactory.getLogger(HttpEndpoint.class);
 
     private HttpClientParams clientParams;
+
+    @UriParam(label = "advanced")
     private HttpClientConfigurer httpClientConfigurer;
     private HttpConnectionManager httpConnectionManager;