camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r1310709 - /camel/trunk/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpComponent.java
Date Sat, 07 Apr 2012 08:54:04 GMT
Author: davsclaus
Date: Sat Apr  7 08:54:03 2012
New Revision: 1310709

URL: http://svn.apache.org/viewvc?rev=1310709&view=rev
Log:
CAMEL-4693: Added support for httpContext option. Thanks to Jeff Segal for the patch.

Modified:
    camel/trunk/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpComponent.java

Modified: camel/trunk/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpComponent.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpComponent.java?rev=1310709&r1=1310708&r2=1310709&view=diff
==============================================================================
--- camel/trunk/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpComponent.java
(original)
+++ camel/trunk/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpComponent.java
Sat Apr  7 08:54:03 2012
@@ -186,12 +186,12 @@ public class HttpComponent extends Heade
 
         X509HostnameVerifier x509HostnameVerifier = resolveAndRemoveReferenceParameter(parameters,
"x509HostnameVerifier", X509HostnameVerifier.class);
         if (x509HostnameVerifier == null) {
-            x509HostnameVerifier = this.x509HostnameVerifier;
+            x509HostnameVerifier = getX509HostnameVerifier();
         }
         
         SSLContextParameters sslContextParameters = resolveAndRemoveReferenceParameter(parameters,
"sslContextParametersRef", SSLContextParameters.class);
         if (sslContextParameters == null) {
-            sslContextParameters = this.sslContextParameters;
+            sslContextParameters = getSslContextParameters();
         }
         
         boolean secure = HttpHelper.isSecureConnection(uri);
@@ -233,6 +233,7 @@ public class HttpComponent extends Heade
         if (httpClientConfigurer != null) {
             endpoint.setHttpClientConfigurer(httpClientConfigurer);
         }
+        endpoint.setHttpContext(getHttpContext());
         if (httpContext != null) {
             endpoint.setHttpContext(httpContext);
         }
@@ -354,7 +355,15 @@ public class HttpComponent extends Heade
     public void setHttpBinding(HttpBinding httpBinding) {
         this.httpBinding = httpBinding;
     }
-    
+
+    public HttpContext getHttpContext() {
+        return httpContext;
+    }
+
+    public void setHttpContext(HttpContext httpContext) {
+        this.httpContext = httpContext;
+    }
+
     public SSLContextParameters getSslContextParameters() {
         return sslContextParameters;
     }
@@ -363,6 +372,14 @@ public class HttpComponent extends Heade
         this.sslContextParameters = sslContextParameters;
     }
 
+    public X509HostnameVerifier getX509HostnameVerifier() {
+        return x509HostnameVerifier;
+    }
+
+    public void setX509HostnameVerifier(X509HostnameVerifier x509HostnameVerifier) {
+        this.x509HostnameVerifier = x509HostnameVerifier;
+    }
+
     public int getMaxTotalConnections() {
         return maxTotalConnections;
     }



Mime
View raw message