camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [3/6] git commit: CAMEL-6017: Allow to configure proxy host/port on component level instead of having to do it on each endpoint.
Date Mon, 07 Oct 2013 16:47:54 GMT
CAMEL-6017: Allow to configure proxy host/port on component level instead of having to do it
on each endpoint.


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

Branch: refs/heads/camel-2.12.x
Commit: d02dbb3f2cefadd48d01abdfcd0e14491d104694
Parents: 63423cc
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Mon Oct 7 18:28:16 2013 +0200
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Mon Oct 7 18:47:09 2013 +0200

----------------------------------------------------------------------
 .../component/jetty/JettyHttpComponent.java     | 22 ++++++++++++++++++--
 1 file changed, 20 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/d02dbb3f/components/camel-jetty/src/main/java/org/apache/camel/component/jetty/JettyHttpComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-jetty/src/main/java/org/apache/camel/component/jetty/JettyHttpComponent.java
b/components/camel-jetty/src/main/java/org/apache/camel/component/jetty/JettyHttpComponent.java
index c2b3108..333f5f9 100644
--- a/components/camel-jetty/src/main/java/org/apache/camel/component/jetty/JettyHttpComponent.java
+++ b/components/camel-jetty/src/main/java/org/apache/camel/component/jetty/JettyHttpComponent.java
@@ -104,6 +104,8 @@ public class JettyHttpComponent extends HttpComponent {
     protected Integer requestHeaderSize;
     protected Integer responseBufferSize;
     protected Integer responseHeaderSize;
+    protected String proxyHost;
+    private Integer proxyPort;
 
     class ConnectorRef {
         Server server;
@@ -154,8 +156,8 @@ public class JettyHttpComponent extends HttpComponent {
         UrlRewrite urlRewrite = resolveAndRemoveReferenceParameter(parameters, "urlRewrite",
UrlRewrite.class);
         SSLContextParameters sslContextParameters = resolveAndRemoveReferenceParameter(parameters,
"sslContextParametersRef", SSLContextParameters.class);
         SSLContextParameters ssl = sslContextParameters != null ? sslContextParameters :
this.sslContextParameters;
-        String proxyHost = getAndRemoveParameter(parameters, "proxyHost", String.class);
-        Integer proxyPort = getAndRemoveParameter(parameters, "proxyPort", Integer.class);
+        String proxyHost = getAndRemoveParameter(parameters, "proxyHost", String.class, getProxyHost());
+        Integer proxyPort = getAndRemoveParameter(parameters, "proxyPort", Integer.class,
getProxyPort());
         Integer responseBufferSize = getAndRemoveParameter(parameters, "responseBufferSize",
Integer.class, getResponseBufferSize());
         
         // extract httpClient. parameters
@@ -891,6 +893,22 @@ public class JettyHttpComponent extends HttpComponent {
         this.responseHeaderSize = responseHeaderSize;
     }
 
+    public String getProxyHost() {
+        return proxyHost;
+    }
+
+    public void setProxyHost(String proxyHost) {
+        this.proxyHost = proxyHost;
+    }
+
+    public Integer getProxyPort() {
+        return proxyPort;
+    }
+
+    public void setProxyPort(Integer proxyPort) {
+        this.proxyPort = proxyPort;
+    }
+
     // Implementation methods
     // -------------------------------------------------------------------------
     protected CamelServlet createServletForConnector(Server server, Connector connector,


Mime
View raw message