Repository: camel
Updated Branches:
  refs/heads/master e5a1e585c -> 68c6dabca


CAMEL-9713: Can not set custom Jetty HttpClient to producer endpoint. Thanks to 
Joe Luo for the patch.


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

Branch: refs/heads/master
Commit: 68c6dabca2da2a20bf5ff54ea3061450c91f2c03
Parents: e5a1e58
Author: Claus Ibsen <davscl...@apache.org>
Authored: Wed Mar 16 08:15:47 2016 +0100
Committer: Claus Ibsen <davscl...@apache.org>
Committed: Wed Mar 16 08:15:47 2016 +0100

----------------------------------------------------------------------
 .../org/apache/camel/component/jetty/JettyHttpComponent.java    | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/68c6dabc/components/camel-jetty-common/src/main/java/org/apache/camel/component/jetty/JettyHttpComponent.java
----------------------------------------------------------------------
diff --git 
a/components/camel-jetty-common/src/main/java/org/apache/camel/component/jetty/JettyHttpComponent.java
 
b/components/camel-jetty-common/src/main/java/org/apache/camel/component/jetty/JettyHttpComponent.java
index 1583e53..b826e0d 100644
--- 
a/components/camel-jetty-common/src/main/java/org/apache/camel/component/jetty/JettyHttpComponent.java
+++ 
b/components/camel-jetty-common/src/main/java/org/apache/camel/component/jetty/JettyHttpComponent.java
@@ -181,6 +181,7 @@ public abstract class JettyHttpComponent extends 
HttpCommonComponent implements
         Integer proxyPort = getAndRemoveParameter(parameters, "proxyPort", 
Integer.class, getProxyPort());
         Integer httpClientMinThreads = getAndRemoveParameter(parameters, 
"httpClientMinThreads", Integer.class, this.httpClientMinThreads);
         Integer httpClientMaxThreads = getAndRemoveParameter(parameters, 
"httpClientMaxThreads", Integer.class, this.httpClientMaxThreads);
+        HttpClient httpClient = resolveAndRemoveReferenceParameter(parameters, 
"httpClient", HttpClient.class);
 
         // extract httpClient. parameters
         Map<String, Object> httpClientParameters = 
IntrospectionSupport.extractProperties(parameters, "httpClient.");
@@ -208,6 +209,7 @@ public abstract class JettyHttpComponent extends 
HttpCommonComponent implements
         } else {
             setEndpointHeaderFilterStrategy(endpoint);
         }
+        // setup the proxy host and proxy port
         if (proxyHost != null) {
             endpoint.setProxyHost(proxyHost);
             endpoint.setProxyPort(proxyPort);
@@ -280,6 +282,9 @@ public abstract class JettyHttpComponent extends 
HttpCommonComponent implements
         if (httpClientMaxThreads != null) {
             endpoint.setHttpClientMaxThreads(httpClientMaxThreads);
         }
+        if (httpClient != null) {
+            endpoint.setHttpClient(httpClient);
+        }
 
         setProperties(endpoint, parameters);
         return endpoint;

Reply via email to