camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dval...@apache.org
Subject svn commit: r1295991 - in /camel/trunk: components/camel-ahc/src/main/java/org/apache/camel/component/ahc/AhcComponent.java parent/pom.xml
Date Thu, 01 Mar 2012 23:35:34 GMT
Author: dvaleri
Date: Thu Mar  1 23:35:34 2012
New Revision: 1295991

URL: http://svn.apache.org/viewvc?rev=1295991&view=rev
Log:
[CAMEL-4081] Updated AHC to 1.7.1 and removed workaround.

Modified:
    camel/trunk/components/camel-ahc/src/main/java/org/apache/camel/component/ahc/AhcComponent.java
    camel/trunk/parent/pom.xml

Modified: camel/trunk/components/camel-ahc/src/main/java/org/apache/camel/component/ahc/AhcComponent.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-ahc/src/main/java/org/apache/camel/component/ahc/AhcComponent.java?rev=1295991&r1=1295990&r2=1295991&view=diff
==============================================================================
--- camel/trunk/components/camel-ahc/src/main/java/org/apache/camel/component/ahc/AhcComponent.java
(original)
+++ camel/trunk/components/camel-ahc/src/main/java/org/apache/camel/component/ahc/AhcComponent.java
Thu Mar  1 23:35:34 2012
@@ -21,9 +21,6 @@ import java.util.Map;
 
 import com.ning.http.client.AsyncHttpClient;
 import com.ning.http.client.AsyncHttpClientConfig;
-import com.ning.http.client.filter.IOExceptionFilter;
-import com.ning.http.client.filter.RequestFilter;
-import com.ning.http.client.filter.ResponseFilter;
 
 import org.apache.camel.Endpoint;
 import org.apache.camel.impl.HeaderFilterStrategyComponent;
@@ -139,48 +136,9 @@ public class AhcComponent extends Header
      * @return a builder configured with the same options as the supplied config
      */
     static AsyncHttpClientConfig.Builder cloneConfig(AsyncHttpClientConfig clientConfig)
{
-        
-        // TODO - Replace with copy based constructor and remove duplicate copy code below
when AHC 1.7 is released (CAMEL-4081).
-        AsyncHttpClientConfig.Builder builder =
-            new AsyncHttpClientConfig.Builder();
-        
-        builder.setAllowPoolingConnection(clientConfig.getAllowPoolingConnection());
-        builder.setAsyncHttpClientProviderConfig(clientConfig.getAsyncHttpProviderConfig());
-        builder.setConnectionsPool(clientConfig.getConnectionsPool());
-        builder.setConnectionTimeoutInMs(clientConfig.getConnectionTimeoutInMs());
-        builder.setIdleConnectionInPoolTimeoutInMs(clientConfig.getIdleConnectionInPoolTimeoutInMs());
-        builder.setMaximumConnectionsPerHost(clientConfig.getMaxConnectionPerHost());
-        builder.setMaximumNumberOfRedirects(clientConfig.getMaxRedirects());
-        builder.setMaximumConnectionsTotal(clientConfig.getMaxTotalConnections());
-        builder.setProxyServer(clientConfig.getProxyServer());
-        builder.setRealm(clientConfig.getRealm());
-        builder.setRequestTimeoutInMs(clientConfig.getRequestTimeoutInMs());
-        builder.setSSLContext(clientConfig.getSSLContext());
-        builder.setSSLEngineFactory(clientConfig.getSSLEngineFactory());
-        builder.setUserAgent(clientConfig.getUserAgent());
-        builder.setFollowRedirects(clientConfig.isRedirectEnabled());
-        builder.setCompressionEnabled(clientConfig.isCompressionEnabled());
-        builder.setScheduledExecutorService(clientConfig.reaper());
-        builder.setExecutorService(clientConfig.executorService());
 
-        for (RequestFilter filter : clientConfig.getRequestFilters()) {
-            builder.addRequestFilter(filter);
-        }
-        
-        for (ResponseFilter filter : clientConfig.getResponseFilters()) {
-            builder.addResponseFilter(filter);
-        }
+        AsyncHttpClientConfig.Builder builder = new AsyncHttpClientConfig.Builder(clientConfig);
 
-        for (IOExceptionFilter filter : clientConfig.getIOExceptionFilters()) {
-            builder.addIOExceptionFilter(filter);
-        }
-        
-        builder.setRequestCompressionLevel(clientConfig.getRequestCompressionLevel());
-        builder.setUseRawUrl(clientConfig.isUseRawUrl());
-        builder.setMaxRequestRetry(clientConfig.getMaxRequestRetry());
-        builder.setAllowSslConnectionPool(clientConfig.getAllowPoolingConnection());
-        // End of duplicate code to remove.
-        
         return builder;
     }
 }

Modified: camel/trunk/parent/pom.xml
URL: http://svn.apache.org/viewvc/camel/trunk/parent/pom.xml?rev=1295991&r1=1295990&r2=1295991&view=diff
==============================================================================
--- camel/trunk/parent/pom.xml (original)
+++ camel/trunk/parent/pom.xml Thu Mar  1 23:35:34 2012
@@ -37,7 +37,7 @@
     <abdera-version>1.1.2</abdera-version>
     <!-- Note that activemq dependency is only used for testing! -->
     <activemq-version>5.5.1</activemq-version>
-    <ahc-version>1.7.0</ahc-version>
+    <ahc-version>1.7.1</ahc-version>
     <apacheds-version>1.5.7</apacheds-version>
     <aries-blueprint-version>0.3</aries-blueprint-version>
     <asm-bundle-version>3.3_2</asm-bundle-version>



Mime
View raw message