camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r1310711 - in /camel/branches/camel-2.9.x: ./ components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpComponent.java
Date Sat, 07 Apr 2012 08:56:13 GMT
Author: davsclaus
Date: Sat Apr  7 08:56:13 2012
New Revision: 1310711

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

Modified:
    camel/branches/camel-2.9.x/   (props changed)
    camel/branches/camel-2.9.x/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpComponent.java

Propchange: camel/branches/camel-2.9.x/
------------------------------------------------------------------------------
  Merged /camel/trunk:r1310709

Propchange: camel/branches/camel-2.9.x/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: camel/branches/camel-2.9.x/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpComponent.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpComponent.java?rev=1310711&r1=1310710&r2=1310711&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpComponent.java
(original)
+++ camel/branches/camel-2.9.x/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpComponent.java
Sat Apr  7 08:56:13 2012
@@ -187,12 +187,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);
@@ -234,6 +234,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