hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r965983 - in /httpcomponents/httpclient/trunk: httpclient/src/main/java/org/apache/http/client/params/ httpclient/src/main/java/org/apache/http/conn/params/ httpclient/src/main/java/org/apache/http/impl/client/ httpclient/src/main/java/org/...
Date Tue, 20 Jul 2010 20:14:10 GMT
Author: olegk
Date: Tue Jul 20 20:14:09 2010
New Revision: 965983

URL: http://svn.apache.org/viewvc?rev=965983&view=rev
Log:
Deprecated ConnManagerPNames and related classes; 'http.conn-manager.timeout' parameter deprecated
in favor of 'http.connection.timeout'; improved javadocs for deprecated classes; renamed methods
in ThreadSafeClientConnManager for better consistency

Modified:
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/params/AllClientPNames.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnManagerPNames.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnManagerParamBean.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnManagerParams.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/DefaultHttpClient.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/DefaultRequestDirector.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/conn/tsccm/ThreadSafeClientConnManager.java
    httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/conn/TestConnectionAutoRelease.java
    httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/conn/TestConnectionReuse.java
    httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/client/TestContentCodings.java
    httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/client/TestStatefulConnManagement.java
    httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/conn/TestIdleConnectionEviction.java
    httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/conn/TestTSCCMNoServer.java
    httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/conn/TestTSCCMWithServer.java
    httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/conn/tsccm/TestSpuriousWakeup.java
    httpcomponents/httpclient/trunk/src/docbkx/connmgmt.xml

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/params/AllClientPNames.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/params/AllClientPNames.java?rev=965983&r1=965982&r2=965983&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/params/AllClientPNames.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/params/AllClientPNames.java
Tue Jul 20 20:14:09 2010
@@ -26,7 +26,6 @@
 
 package org.apache.http.client.params;
 
-
 import org.apache.http.params.CoreConnectionPNames;
 import org.apache.http.params.CoreProtocolPNames;
 import org.apache.http.auth.params.AuthPNames;
@@ -35,7 +34,6 @@ import org.apache.http.conn.params.ConnM
 import org.apache.http.conn.params.ConnConnectionPNames;
 import org.apache.http.conn.params.ConnRoutePNames;
 
-
 /**
  * Collected parameter names for the HttpClient module.
  * This interface combines the parameter definitions of the HttpClient
@@ -49,6 +47,7 @@ import org.apache.http.conn.params.ConnR
  *
  * @since 4.0
  */
+@SuppressWarnings("deprecation")
 public interface AllClientPNames extends
     CoreConnectionPNames, CoreProtocolPNames,
     ClientPNames, AuthPNames, CookieSpecPNames,

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnManagerPNames.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnManagerPNames.java?rev=965983&r1=965982&r2=965983&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnManagerPNames.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnManagerPNames.java
Tue Jul 20 20:14:09 2010
@@ -26,11 +26,15 @@
 
 package org.apache.http.conn.params;
 
+import org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager;
+import org.apache.http.params.CoreConnectionPNames;
+
 /**
  * Parameter names for connection managers in HttpConn.
  *
  * @since 4.0
  */
+@Deprecated
 public interface ConnManagerPNames {
 
     /**
@@ -39,7 +43,8 @@ public interface ConnManagerPNames {
      * {@link org.apache.http.conn.ClientConnectionManager}.
      * <p>
      * This parameter expects a value of type {@link Long}.
-     * </p>
+     * <p>
+     * @deprecated use {@link CoreConnectionPNames#CONNECTION_TIMEOUT}
      */
     public static final String TIMEOUT = "http.conn-manager.timeout";
 
@@ -49,9 +54,10 @@ public interface ConnManagerPNames {
      * and applies to individual manager instances.
      * <p>
      * This parameter expects a value of type {@link ConnPerRoute}.
-     * </p>
+     * <p>
+     * @deprecated use {@link ThreadSafeClientConnManager#setMaxForRoute(org.apache.http.conn.routing.HttpRoute,
int)},
+     *  {@link ThreadSafeClientConnManager#getMaxForRoute(org.apache.http.conn.routing.HttpRoute)}
      */
-    @Deprecated
     public static final String MAX_CONNECTIONS_PER_ROUTE = "http.conn-manager.max-per-route";
 
     /**
@@ -60,9 +66,10 @@ public interface ConnManagerPNames {
      * and applies to individual manager instances.
      * <p>
      * This parameter expects a value of type {@link Integer}.
-     * </p>
+     * <p>
+     * @deprecated use {@link ThreadSafeClientConnManager#setMaxTotal(int)},
+     *  {@link ThreadSafeClientConnManager#getMaxTotal()}
      */
-    @Deprecated
     public static final String MAX_TOTAL_CONNECTIONS = "http.conn-manager.max-total";
 
 }

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnManagerParamBean.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnManagerParamBean.java?rev=965983&r1=965982&r2=965983&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnManagerParamBean.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnManagerParamBean.java
Tue Jul 20 20:14:09 2010
@@ -40,6 +40,7 @@ import org.apache.http.params.HttpParams
  * @since 4.0
  */
 @NotThreadSafe
+@Deprecated
 public class ConnManagerParamBean extends HttpAbstractParamBean {
 
     public ConnManagerParamBean (final HttpParams params) {

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnManagerParams.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnManagerParams.java?rev=965983&r1=965982&r2=965983&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnManagerParams.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/params/ConnManagerParams.java
Tue Jul 20 20:14:09 2010
@@ -29,6 +29,8 @@ package org.apache.http.conn.params;
 import org.apache.http.annotation.Immutable;
 
 import org.apache.http.conn.routing.HttpRoute;
+import org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager;
+import org.apache.http.params.HttpConnectionParams;
 import org.apache.http.params.HttpParams;
 
 /**
@@ -39,6 +41,7 @@ import org.apache.http.params.HttpParams
  *
  * @see ConnManagerPNames
  */
+@Deprecated
 @Immutable
 public final class ConnManagerParams implements ConnManagerPNames {
 
@@ -51,6 +54,8 @@ public final class ConnManagerParams imp
      * {@link org.apache.http.conn.ClientConnectionManager}.
      *
      * @return timeout in milliseconds.
+     * 
+     * @deprecated use {@link HttpConnectionParams#getConnectionTimeout(HttpParams)}
      */
     public static long getTimeout(final HttpParams params) {
         if (params == null) {
@@ -65,6 +70,8 @@ public final class ConnManagerParams imp
      * {@link org.apache.http.conn.ClientConnectionManager}.
      *
      * @param timeout the timeout in milliseconds
+     * 
+     * @deprecated use {@link HttpConnectionParams#setConnectionTimeout(HttpParams, int)
      */
     public static void setTimeout(final HttpParams params, long timeout) {
         if (params == null) {
@@ -74,7 +81,6 @@ public final class ConnManagerParams imp
     }
 
     /** The default maximum number of connections allowed per host */
-    @Deprecated
     private static final ConnPerRoute DEFAULT_CONN_PER_ROUTE = new ConnPerRoute() {
 
         public int getMaxForRoute(HttpRoute route) {
@@ -90,11 +96,8 @@ public final class ConnManagerParams imp
      * @param connPerRoute lookup interface for maximum number of connections allowed
      *        per route
      *
-     * @deprecated do not use
-     *
-     * @see ConnManagerPNames#MAX_CONNECTIONS_PER_ROUTE
+     * @deprecated use {@link ThreadSafeClientConnManager#setMaxForRoute(org.apache.http.conn.routing.HttpRoute,
int)}
      */
-    @Deprecated
     public static void setMaxConnectionsPerRoute(final HttpParams params,
                                                 final ConnPerRoute connPerRoute) {
         if (params == null) {
@@ -111,11 +114,8 @@ public final class ConnManagerParams imp
      *
      * @return lookup interface for maximum number of connections allowed per route.
      *
-     * @deprecated do not use
-     *
-     * @see ConnManagerPNames#MAX_CONNECTIONS_PER_ROUTE
+     * @deprecated use {@link ThreadSafeClientConnManager#getMaxForRoute(org.apache.http.conn.routing.HttpRoute)}
      */
-    @Deprecated
     public static ConnPerRoute getMaxConnectionsPerRoute(final HttpParams params) {
         if (params == null) {
             throw new IllegalArgumentException
@@ -128,18 +128,14 @@ public final class ConnManagerParams imp
         return connPerRoute;
     }
 
-
     /**
      * Sets the maximum number of connections allowed.
      *
      * @param params HTTP parameters
      * @param maxTotalConnections The maximum number of connections allowed.
      *
-     * @deprecated do not use
-     *
-     * @see ConnManagerPNames#MAX_TOTAL_CONNECTIONS
+     * @deprecated use {@link ThreadSafeClientConnManager#setMaxTotal(int)}
      */
-    @Deprecated
     public static void setMaxTotalConnections(
             final HttpParams params,
             int maxTotalConnections) {
@@ -157,11 +153,8 @@ public final class ConnManagerParams imp
      *
      * @return The maximum number of connections allowed.
      *
-     * @deprecated do not use
-     *
-     * @see ConnManagerPNames#MAX_TOTAL_CONNECTIONS
+     * @deprecated use {@link ThreadSafeClientConnManager#getMaxTotal()}
      */
-    @Deprecated
     public static int getMaxTotalConnections(
             final HttpParams params) {
         if (params == null) {
@@ -171,5 +164,4 @@ public final class ConnManagerParams imp
         return params.getIntParameter(MAX_TOTAL_CONNECTIONS, DEFAULT_MAX_TOTAL_CONNECTIONS);
     }
 
-
 }

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/DefaultHttpClient.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/DefaultHttpClient.java?rev=965983&r1=965982&r2=965983&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/DefaultHttpClient.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/DefaultHttpClient.java
Tue Jul 20 20:14:09 2010
@@ -135,7 +135,6 @@ import org.apache.http.util.VersionInfo;
  *  <li>{@link org.apache.http.conn.params.ConnRoutePNames#FORCED_ROUTE}</li>
  *  <li>{@link org.apache.http.conn.params.ConnRoutePNames#LOCAL_ADDRESS}</li>
  *  <li>{@link org.apache.http.conn.params.ConnRoutePNames#DEFAULT_PROXY}</li>
- *  <li>{@link org.apache.http.conn.params.ConnManagerPNames#TIMEOUT}</li>
  *  <li>{@link org.apache.http.cookie.params.CookieSpecPNames#DATE_PATTERNS}</li>
  *  <li>{@link org.apache.http.cookie.params.CookieSpecPNames#SINGLE_COOKIE_HEADER}</li>
  *  <li>{@link org.apache.http.auth.params.AuthPNames#CREDENTIAL_CHARSET}</li>

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/DefaultRequestDirector.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/DefaultRequestDirector.java?rev=965983&r1=965982&r2=965983&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/DefaultRequestDirector.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/DefaultRequestDirector.java
Tue Jul 20 20:14:09 2010
@@ -74,7 +74,6 @@ import org.apache.http.conn.ClientConnec
 import org.apache.http.conn.ClientConnectionRequest;
 import org.apache.http.conn.ConnectionKeepAliveStrategy;
 import org.apache.http.conn.ManagedClientConnection;
-import org.apache.http.conn.params.ConnManagerParams;
 import org.apache.http.conn.routing.BasicRouteDirector;
 import org.apache.http.conn.routing.HttpRoute;
 import org.apache.http.conn.routing.HttpRouteDirector;
@@ -115,7 +114,6 @@ import org.apache.http.protocol.HttpRequ
  *  <li>{@link org.apache.http.conn.params.ConnRoutePNames#FORCED_ROUTE}</li>
  *  <li>{@link org.apache.http.conn.params.ConnRoutePNames#LOCAL_ADDRESS}</li>
  *  <li>{@link org.apache.http.conn.params.ConnRoutePNames#DEFAULT_PROXY}</li>
- *  <li>{@link org.apache.http.conn.params.ConnManagerPNames#TIMEOUT}</li>
  *  <li>{@link org.apache.http.cookie.params.CookieSpecPNames#DATE_PATTERNS}</li>
  *  <li>{@link org.apache.http.cookie.params.CookieSpecPNames#SINGLE_COOKIE_HEADER}</li>
  *  <li>{@link org.apache.http.auth.params.AuthPNames#CREDENTIAL_CHARSET}</li>
@@ -361,7 +359,7 @@ public class DefaultRequestDirector impl
 
         RoutedRequest roureq = new RoutedRequest(origWrapper, origRoute);
 
-        long timeout = ConnManagerParams.getTimeout(params);
+        long timeout = HttpConnectionParams.getConnectionTimeout(params);
 
         boolean reuse = false;
         boolean done = false;

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/conn/tsccm/ThreadSafeClientConnManager.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/conn/tsccm/ThreadSafeClientConnManager.java?rev=965983&r1=965982&r2=965983&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/conn/tsccm/ThreadSafeClientConnManager.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/conn/tsccm/ThreadSafeClientConnManager.java
Tue Jul 20 20:14:09 2010
@@ -302,14 +302,14 @@ public class ThreadSafeClientConnManager
     /**
      * since 4.1
      */
-    public int getMaxTotalConnections() {
+    public int getMaxTotal() {
         return pool.getMaxTotalConnections();
     }
 
     /**
      * since 4.1
      */
-    public void setMaxTotalConnections(int max) {
+    public void setMaxTotal(int max) {
         pool.setMaxTotalConnections(max);
     }
 

Modified: httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/conn/TestConnectionAutoRelease.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/conn/TestConnectionAutoRelease.java?rev=965983&r1=965982&r2=965983&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/conn/TestConnectionAutoRelease.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/conn/TestConnectionAutoRelease.java
Tue Jul 20 20:14:09 2010
@@ -65,7 +65,7 @@ public class TestConnectionAutoRelease e
     public void testReleaseOnEntityConsumeContent() throws Exception {
         ThreadSafeClientConnManager mgr = createTSCCM(null);
         mgr.setDefaultMaxPerRoute(1);
-        mgr.setMaxTotalConnections(1);
+        mgr.setMaxTotal(1);
 
         // Zero connections in the pool
         Assert.assertEquals(0, mgr.getConnectionsInPool());
@@ -105,7 +105,7 @@ public class TestConnectionAutoRelease e
     public void testReleaseOnEntityWriteTo() throws Exception {
         ThreadSafeClientConnManager mgr = createTSCCM(null);
         mgr.setDefaultMaxPerRoute(1);
-        mgr.setMaxTotalConnections(1);
+        mgr.setMaxTotal(1);
 
         // Zero connections in the pool
         Assert.assertEquals(0, mgr.getConnectionsInPool());
@@ -146,7 +146,7 @@ public class TestConnectionAutoRelease e
     public void testReleaseOnAbort() throws Exception {
         ThreadSafeClientConnManager mgr = createTSCCM(null);
         mgr.setDefaultMaxPerRoute(1);
-        mgr.setMaxTotalConnections(1);
+        mgr.setMaxTotal(1);
 
         // Zero connections in the pool
         Assert.assertEquals(0, mgr.getConnectionsInPool());
@@ -219,7 +219,7 @@ public class TestConnectionAutoRelease e
 
         ThreadSafeClientConnManager mgr = createTSCCM(null);
         mgr.setDefaultMaxPerRoute(1);
-        mgr.setMaxTotalConnections(1);
+        mgr.setMaxTotal(1);
 
         // Zero connections in the pool
         Assert.assertEquals(0, mgr.getConnectionsInPool());

Modified: httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/conn/TestConnectionReuse.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/conn/TestConnectionReuse.java?rev=965983&r1=965982&r2=965983&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/conn/TestConnectionReuse.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/conn/TestConnectionReuse.java
Tue Jul 20 20:14:09 2010
@@ -100,7 +100,7 @@ public class TestConnectionReuse {
         supportedSchemes.register(new Scheme("http", 80, sf));
 
         ThreadSafeClientConnManager mgr = new ThreadSafeClientConnManager(supportedSchemes);
-        mgr.setMaxTotalConnections(5);
+        mgr.setMaxTotal(5);
         mgr.setDefaultMaxPerRoute(5);
 
         DefaultHttpClient client = new DefaultHttpClient(mgr, params);
@@ -171,7 +171,7 @@ public class TestConnectionReuse {
         supportedSchemes.register(new Scheme("http", 80, sf));
 
         ThreadSafeClientConnManager mgr = new ThreadSafeClientConnManager(supportedSchemes);
-        mgr.setMaxTotalConnections(5);
+        mgr.setMaxTotal(5);
         mgr.setDefaultMaxPerRoute(5);
 
         DefaultHttpClient client = new DefaultHttpClient(mgr, params);
@@ -232,7 +232,7 @@ public class TestConnectionReuse {
         supportedSchemes.register(new Scheme("http", 80, sf));
 
         ThreadSafeClientConnManager mgr = new ThreadSafeClientConnManager(supportedSchemes);
-        mgr.setMaxTotalConnections(5);
+        mgr.setMaxTotal(5);
         mgr.setDefaultMaxPerRoute(5);
 
         DefaultHttpClient client = new DefaultHttpClient(mgr, params);
@@ -294,7 +294,7 @@ public class TestConnectionReuse {
         supportedSchemes.register(new Scheme("http", 80, sf));
 
         ThreadSafeClientConnManager mgr = new ThreadSafeClientConnManager(supportedSchemes);
-        mgr.setMaxTotalConnections(1);
+        mgr.setMaxTotal(1);
         mgr.setDefaultMaxPerRoute(1);
 
         DefaultHttpClient client = new DefaultHttpClient(mgr, params);

Modified: httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/client/TestContentCodings.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/client/TestContentCodings.java?rev=965983&r1=965982&r2=965983&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/client/TestContentCodings.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/client/TestContentCodings.java
Tue Jul 20 20:14:09 2010
@@ -189,7 +189,7 @@ public class TestContentCodings extends 
         schemeRegistry.register(new Scheme("http", 80, PlainSocketFactory.getSocketFactory()));
 
         ThreadSafeClientConnManager cm = new ThreadSafeClientConnManager(schemeRegistry);
-        cm.setMaxTotalConnections(clients);
+        cm.setMaxTotal(clients);
 
         final HttpClient httpClient = new DefaultHttpClient(cm);
 

Modified: httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/client/TestStatefulConnManagement.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/client/TestStatefulConnManagement.java?rev=965983&r1=965982&r2=965983&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/client/TestStatefulConnManagement.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/client/TestStatefulConnManagement.java
Tue Jul 20 20:14:09 2010
@@ -86,7 +86,7 @@ public class TestStatefulConnManagement 
         ConnManagerParams.setTimeout(params, 10L);
 
         ThreadSafeClientConnManager mgr = new ThreadSafeClientConnManager(supportedSchemes);
-        mgr.setMaxTotalConnections(workerCount);
+        mgr.setMaxTotal(workerCount);
         mgr.setDefaultMaxPerRoute(workerCount);
 
 
@@ -211,7 +211,7 @@ public class TestStatefulConnManagement 
 
         // We build a client with 2 max active // connections, and 2 max per route.
         ThreadSafeClientConnManager connMngr = new ThreadSafeClientConnManager(supportedSchemes);
-        connMngr.setMaxTotalConnections(maxConn);
+        connMngr.setMaxTotal(maxConn);
         connMngr.setDefaultMaxPerRoute(maxConn);
 
         DefaultHttpClient client = new DefaultHttpClient(connMngr);

Modified: httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/conn/TestIdleConnectionEviction.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/conn/TestIdleConnectionEviction.java?rev=965983&r1=965982&r2=965983&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/conn/TestIdleConnectionEviction.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/conn/TestIdleConnectionEviction.java
Tue Jul 20 20:14:09 2010
@@ -70,7 +70,7 @@ public class TestIdleConnectionEviction 
 
         ThreadSafeClientConnManager cm = new ThreadSafeClientConnManager(schemeRegistry);
         cm.setDefaultMaxPerRoute(10);
-        cm.setMaxTotalConnections(50);
+        cm.setMaxTotal(50);
 
         DefaultHttpClient httpclient = new DefaultHttpClient(cm, params);
 

Modified: httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/conn/TestTSCCMNoServer.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/conn/TestTSCCMNoServer.java?rev=965983&r1=965982&r2=965983&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/conn/TestTSCCMNoServer.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/conn/TestTSCCMNoServer.java
Tue Jul 20 20:14:09 2010
@@ -153,7 +153,7 @@ public class TestTSCCMNoServer {
             throws InterruptedException, ConnectionPoolTimeoutException {
 
         ThreadSafeClientConnManager mgr = createTSCCM(null);
-        mgr.setMaxTotalConnections(2);
+        mgr.setMaxTotal(2);
         mgr.setDefaultMaxPerRoute(1);
 
         HttpHost target1 = new HttpHost("www.test1.invalid", 80, "http");
@@ -199,7 +199,7 @@ public class TestTSCCMNoServer {
         HttpRoute route3 = new HttpRoute(target3, null, false);
 
         ThreadSafeClientConnManager mgr = createTSCCM(null);
-        mgr.setMaxTotalConnections(100);
+        mgr.setMaxTotal(100);
         mgr.setDefaultMaxPerRoute(1);
         mgr.setMaxForRoute(route2, 2);
         mgr.setMaxForRoute(route3, 3);
@@ -265,7 +265,7 @@ public class TestTSCCMNoServer {
     public void testReleaseConnection() throws Exception {
 
         ThreadSafeClientConnManager mgr = createTSCCM(null);
-        mgr.setMaxTotalConnections(3);
+        mgr.setMaxTotal(3);
         mgr.setDefaultMaxPerRoute(1);
 
         HttpHost target1 = new HttpHost("www.test1.invalid", 80, "http");
@@ -367,7 +367,7 @@ public class TestTSCCMNoServer {
         // 3.x: TestHttpConnectionManager.testShutdown
 
         ThreadSafeClientConnManager mgr = createTSCCM(null);
-        mgr.setMaxTotalConnections(1);
+        mgr.setMaxTotal(1);
         mgr.setDefaultMaxPerRoute(1);
 
         HttpHost target = new HttpHost("www.test.invalid", 80, "http");
@@ -413,7 +413,7 @@ public class TestTSCCMNoServer {
         // 3.x: TestHttpConnectionManager.testWaitingThreadInterrupted
 
         ThreadSafeClientConnManager mgr = createTSCCM(null);
-        mgr.setMaxTotalConnections(1);
+        mgr.setMaxTotal(1);
 
         HttpHost target = new HttpHost("www.test.invalid", 80, "http");
         HttpRoute route = new HttpRoute(target, null, false);
@@ -458,7 +458,7 @@ public class TestTSCCMNoServer {
         // 3.x: TestHttpConnectionManager.testHostReusePreference
 
         ThreadSafeClientConnManager mgr = createTSCCM(null);
-        mgr.setMaxTotalConnections(1);
+        mgr.setMaxTotal(1);
 
         HttpHost target1 = new HttpHost("www.test1.invalid", 80, "http");
         HttpRoute route1 = new HttpRoute(target1, null, false);
@@ -497,7 +497,7 @@ public class TestTSCCMNoServer {
     @Test
     public void testAbortAfterRequestStarts() throws Exception {
         ThreadSafeClientConnManager mgr = createTSCCM(null);
-        mgr.setMaxTotalConnections(1);
+        mgr.setMaxTotal(1);
 
         HttpHost target = new HttpHost("www.test.invalid", 80, "http");
         HttpRoute route = new HttpRoute(target, null, false);
@@ -537,7 +537,7 @@ public class TestTSCCMNoServer {
     @Test
     public void testAbortBeforeRequestStarts() throws Exception {
         ThreadSafeClientConnManager mgr = createTSCCM(null);
-        mgr.setMaxTotalConnections(1);
+        mgr.setMaxTotal(1);
 
         HttpHost target = new HttpHost("www.test.invalid", 80, "http");
         HttpRoute route = new HttpRoute(target, null, false);

Modified: httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/conn/TestTSCCMWithServer.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/conn/TestTSCCMWithServer.java?rev=965983&r1=965982&r2=965983&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/conn/TestTSCCMWithServer.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/conn/TestTSCCMWithServer.java
Tue Jul 20 20:14:09 2010
@@ -96,7 +96,7 @@ public class TestTSCCMWithServer extends
         final int COUNT = 8; // adjust to execute more requests
 
         ThreadSafeClientConnManager mgr = createTSCCM(null);
-        mgr.setMaxTotalConnections(COUNT/2);
+        mgr.setMaxTotal(COUNT/2);
         mgr.setDefaultMaxPerRoute(COUNT/2);
 
         final HttpHost target = getServerHttp();
@@ -169,7 +169,7 @@ public class TestTSCCMWithServer extends
     public void testReleaseConnection() throws Exception {
 
         ThreadSafeClientConnManager mgr = createTSCCM(null);
-        mgr.setMaxTotalConnections(1);
+        mgr.setMaxTotal(1);
 
         final HttpHost target = getServerHttp();
         final HttpRoute route = new HttpRoute(target, null, false);
@@ -255,7 +255,7 @@ public class TestTSCCMWithServer extends
     public void testReleaseConnectionWithTimeLimits() throws Exception {
 
         ThreadSafeClientConnManager mgr = createTSCCM(null);
-        mgr.setMaxTotalConnections(1);
+        mgr.setMaxTotal(1);
 
         final HttpHost target = getServerHttp();
         final HttpRoute route = new HttpRoute(target, null, false);
@@ -357,7 +357,7 @@ public class TestTSCCMWithServer extends
     public void testCloseExpiredConnections() throws Exception {
 
         ThreadSafeClientConnManager mgr = createTSCCM(null);
-        mgr.setMaxTotalConnections(1);
+        mgr.setMaxTotal(1);
 
         final HttpHost target = getServerHttp();
         final HttpRoute route = new HttpRoute(target, null, false);
@@ -398,7 +398,7 @@ public class TestTSCCMWithServer extends
     public void testReleaseConnectionOnAbort() throws Exception {
 
         ThreadSafeClientConnManager mgr = createTSCCM(null);
-        mgr.setMaxTotalConnections(1);
+        mgr.setMaxTotal(1);
 
         final HttpHost target = getServerHttp();
         final HttpRoute route = new HttpRoute(target, null, false);
@@ -501,7 +501,7 @@ public class TestTSCCMWithServer extends
         registry.register(scheme);
 
         ThreadSafeClientConnManager mgr = createTSCCM(registry);
-        mgr.setMaxTotalConnections(1);
+        mgr.setMaxTotal(1);
 
         final HttpHost target = getServerHttp();
         final HttpRoute route = new HttpRoute(target, null, false);
@@ -553,7 +553,7 @@ public class TestTSCCMWithServer extends
         registry.register(scheme);
 
         ThreadSafeClientConnManager mgr = createTSCCM(registry);
-        mgr.setMaxTotalConnections(1);
+        mgr.setMaxTotal(1);
 
         final HttpHost target = getServerHttp();
         final HttpRoute route = new HttpRoute(target, null, false);
@@ -607,7 +607,7 @@ public class TestTSCCMWithServer extends
         registry.register(scheme);
 
         ThreadSafeClientConnManager mgr = createTSCCM(registry);
-        mgr.setMaxTotalConnections(1);
+        mgr.setMaxTotal(1);
 
         final HttpHost target = getServerHttp();
         final HttpRoute route = new HttpRoute(target, null, false);
@@ -669,7 +669,7 @@ public class TestTSCCMWithServer extends
                 return operatorRef.get();
             }
         };
-        mgr.setMaxTotalConnections(1);
+        mgr.setMaxTotal(1);
         Assert.assertNotNull(operatorRef.get());
 
         final HttpHost target = getServerHttp();

Modified: httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/conn/tsccm/TestSpuriousWakeup.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/conn/tsccm/TestSpuriousWakeup.java?rev=965983&r1=965982&r2=965983&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/conn/tsccm/TestSpuriousWakeup.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/conn/tsccm/TestSpuriousWakeup.java
Tue Jul 20 20:14:09 2010
@@ -117,7 +117,7 @@ public class TestSpuriousWakeup {
 
         XTSCCM mgr = new XTSCCM(schreg);
         try {
-            mgr.setMaxTotalConnections(1);
+            mgr.setMaxTotal(1);
             mgr.setDefaultMaxPerRoute(1);
 
             // take out the only connection

Modified: httpcomponents/httpclient/trunk/src/docbkx/connmgmt.xml
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/src/docbkx/connmgmt.xml?rev=965983&r1=965982&r2=965983&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/src/docbkx/connmgmt.xml (original)
+++ httpcomponents/httpclient/trunk/src/docbkx/connmgmt.xml Tue Jul 20 20:14:09 2010
@@ -603,24 +603,6 @@ httpclient.getConnectionManager().shutdo
         </section>
     </section>
     <section>
-        <title>Connection management parameters</title>
-        <para>These are parameters that be used to customize standard HTTP connection
manager
-            implementations:</para>
-        <itemizedlist>
-            <listitem>
-                <formalpara>
-                    <title>'http.conn-manager.timeout':</title>
-                    <para>defines the timeout in milliseconds used when retrieving
an instance of
-                            <interfacename>ManagedClientConnection</interfacename>
from the
-                            <interfacename>ClientConnectionManager</interfacename>
This parameter
-                        expects a value of type <classname>java.lang.Long</classname>.
If this
-                        parameter is not set connection requests will not time out (infinite
-                        timeout).</para>
-                </formalpara>
-            </listitem>
-        </itemizedlist>
-    </section>
-    <section>
         <title>Multithreaded request execution</title>
         <para>When equipped with a pooling connection manager such as ThreadSafeClientConnManager
             HttpClient can be used to execute multiple requests simultaneously using multiple



Mime
View raw message