diff --git a/httpclient/src/main/java/org/apache/http/conn/params/ConnConnectionPNames.java b/httpclient/src/main/java/org/apache/http/conn/params/ConnConnectionPNames.java index f7d050f32..ad68faa20 100644 --- a/httpclient/src/main/java/org/apache/http/conn/params/ConnConnectionPNames.java +++ b/httpclient/src/main/java/org/apache/http/conn/params/ConnConnectionPNames.java @@ -30,17 +30,13 @@ package org.apache.http.conn.params; - /** - * Parameter names for connections in HttpConn. - * - * @version $Revision$ + * Parameter names for HTTP client connections. * * @since 4.0 */ public interface ConnConnectionPNames { - /** * Defines the maximum number of ignorable lines before we expect * a HTTP response's status line. diff --git a/httpclient/src/main/java/org/apache/http/conn/params/ConnManagerPNames.java b/httpclient/src/main/java/org/apache/http/conn/params/ConnManagerPNames.java index 08fd92ca5..94155a05b 100644 --- a/httpclient/src/main/java/org/apache/http/conn/params/ConnManagerPNames.java +++ b/httpclient/src/main/java/org/apache/http/conn/params/ConnManagerPNames.java @@ -30,11 +30,8 @@ package org.apache.http.conn.params; - /** * Parameter names for connection managers in HttpConn. - * - * @version $Revision$ * * @since 4.0 */ diff --git a/httpclient/src/main/java/org/apache/http/conn/params/ConnManagerParams.java b/httpclient/src/main/java/org/apache/http/conn/params/ConnManagerParams.java index 1de36f0c6..35e0f5d7c 100644 --- a/httpclient/src/main/java/org/apache/http/conn/params/ConnManagerParams.java +++ b/httpclient/src/main/java/org/apache/http/conn/params/ConnManagerParams.java @@ -40,9 +40,6 @@ import org.apache.http.params.HttpParams; * to client-side * {@link org.apache.http.conn.ClientConnectionManager connection managers}. * - * - * @version $Revision$ - * * @since 4.0 * * @see ConnManagerPNames diff --git a/httpclient/src/main/java/org/apache/http/conn/params/ConnPerRoute.java b/httpclient/src/main/java/org/apache/http/conn/params/ConnPerRoute.java index 74acab731..d01a4b798 100644 --- a/httpclient/src/main/java/org/apache/http/conn/params/ConnPerRoute.java +++ b/httpclient/src/main/java/org/apache/http/conn/params/ConnPerRoute.java @@ -34,13 +34,10 @@ import org.apache.http.conn.routing.HttpRoute; /** * This interface is intended for looking up maximum number of connections - * allowed for for a given route. This class can be used by pooling + * allowed for a given route. This class can be used by pooling * {@link org.apache.http.conn.ClientConnectionManager connection managers} for * a fine-grained control of connections on a per route basis. * - * - * @version $Revision$ - * * @since 4.0 */ public interface ConnPerRoute { diff --git a/httpclient/src/main/java/org/apache/http/conn/params/ConnPerRouteBean.java b/httpclient/src/main/java/org/apache/http/conn/params/ConnPerRouteBean.java index a800566fd..f58d6188a 100644 --- a/httpclient/src/main/java/org/apache/http/conn/params/ConnPerRouteBean.java +++ b/httpclient/src/main/java/org/apache/http/conn/params/ConnPerRouteBean.java @@ -43,9 +43,6 @@ import org.apache.http.conn.routing.HttpRoute; * {@link org.apache.http.conn.ClientConnectionManager connection managers} for * a fine-grained control of connections on a per route basis. * - * - * @version $Revision$ - * * @since 4.0 */ @NotThreadSafe // maxPerHostMap and defaultMax @@ -112,5 +109,10 @@ public final class ConnPerRouteBean implements ConnPerRoute { this.maxPerHostMap.clear(); this.maxPerHostMap.putAll(map); } + + @Override + public String toString() { + return this.maxPerHostMap.toString(); + } } diff --git a/httpclient/src/main/java/org/apache/http/conn/params/ConnRoutePNames.java b/httpclient/src/main/java/org/apache/http/conn/params/ConnRoutePNames.java index 99cfec7b2..2ee85ba29 100644 --- a/httpclient/src/main/java/org/apache/http/conn/params/ConnRoutePNames.java +++ b/httpclient/src/main/java/org/apache/http/conn/params/ConnRoutePNames.java @@ -33,8 +33,6 @@ package org.apache.http.conn.params; /** * Parameter names for routing in HttpConn. * - * @version $Revision$ - * * @since 4.0 */ public interface ConnRoutePNames { @@ -50,7 +48,6 @@ public interface ConnRoutePNames { */ public static final String DEFAULT_PROXY = "http.route.default-proxy"; - /** * Parameter for the local address. * On machines with multiple network interfaces, this parameter @@ -65,7 +62,6 @@ public interface ConnRoutePNames { */ public static final String LOCAL_ADDRESS = "http.route.local-address"; - /** * Parameter for an forced route. * The forced route will be interpreted by the standard diff --git a/httpclient/src/main/java/org/apache/http/conn/params/ConnRouteParams.java b/httpclient/src/main/java/org/apache/http/conn/params/ConnRouteParams.java index 9f882a723..2a3e3790e 100644 --- a/httpclient/src/main/java/org/apache/http/conn/params/ConnRouteParams.java +++ b/httpclient/src/main/java/org/apache/http/conn/params/ConnRouteParams.java @@ -30,7 +30,6 @@ package org.apache.http.conn.params; - import java.net.InetAddress; import net.jcip.annotations.Immutable; @@ -39,15 +38,10 @@ import org.apache.http.HttpHost; import org.apache.http.params.HttpParams; import org.apache.http.conn.routing.HttpRoute; - - /** * An adaptor for accessing route related parameters in {@link HttpParams}. * See {@link ConnRoutePNames} for parameter name definitions. * - * - * @version $Revision$ - * * @since 4.0 */ @Immutable @@ -67,13 +61,11 @@ public class ConnRouteParams implements ConnRoutePNames { */ public static final HttpRoute NO_ROUTE = new HttpRoute(NO_HOST); // Immutable - /** Disabled default constructor. */ private ConnRouteParams() { // no body } - /** * Obtains the {@link ConnRoutePNames#DEFAULT_PROXY DEFAULT_PROXY} * parameter value. @@ -98,7 +90,6 @@ public class ConnRouteParams implements ConnRoutePNames { return proxy; } - /** * Sets the {@link ConnRoutePNames#DEFAULT_PROXY DEFAULT_PROXY} * parameter value. @@ -117,7 +108,6 @@ public class ConnRouteParams implements ConnRoutePNames { params.setParameter(DEFAULT_PROXY, proxy); } - /** * Obtains the {@link ConnRoutePNames#FORCED_ROUTE FORCED_ROUTE} * parameter value. @@ -142,7 +132,6 @@ public class ConnRouteParams implements ConnRoutePNames { return route; } - /** * Sets the {@link ConnRoutePNames#FORCED_ROUTE FORCED_ROUTE} * parameter value. @@ -161,7 +150,6 @@ public class ConnRouteParams implements ConnRoutePNames { params.setParameter(FORCED_ROUTE, route); } - /** * Obtains the {@link ConnRoutePNames#LOCAL_ADDRESS LOCAL_ADDRESS} * parameter value. @@ -184,7 +172,6 @@ public class ConnRouteParams implements ConnRoutePNames { return local; } - /** * Sets the {@link ConnRoutePNames#LOCAL_ADDRESS LOCAL_ADDRESS} * parameter value. diff --git a/httpclient/src/main/java/org/apache/http/impl/conn/DefaultClientConnection.java b/httpclient/src/main/java/org/apache/http/impl/conn/DefaultClientConnection.java index 64b878f9c..47e32ab0c 100644 --- a/httpclient/src/main/java/org/apache/http/impl/conn/DefaultClientConnection.java +++ b/httpclient/src/main/java/org/apache/http/impl/conn/DefaultClientConnection.java @@ -56,9 +56,11 @@ import org.apache.http.conn.OperatedClientConnection; * The following parameters can be used to customize the behavior of this * class: *
synchronized
methods.
*
- *
* @since 4.0
*/
public class ConnPoolByRoute extends AbstractConnPool {
private final Log log = LogFactory.getLog(getClass());
- protected final HttpParams params;
+ private final HttpParams params;
/** Connection operator for this pool */
protected final ClientConnectionOperator operator;
diff --git a/httpclient/src/main/java/org/apache/http/impl/conn/tsccm/ThreadSafeClientConnManager.java b/httpclient/src/main/java/org/apache/http/impl/conn/tsccm/ThreadSafeClientConnManager.java
index 5a5eb7b20..367a13a58 100644
--- a/httpclient/src/main/java/org/apache/http/impl/conn/tsccm/ThreadSafeClientConnManager.java
+++ b/httpclient/src/main/java/org/apache/http/impl/conn/tsccm/ThreadSafeClientConnManager.java
@@ -46,19 +46,32 @@ import org.apache.http.conn.OperatedClientConnection;
import org.apache.http.params.HttpParams;
import org.apache.http.impl.conn.DefaultClientConnectionOperator;
-
-
/**
- * Manages a pool of {@link OperatedClientConnection client connections}.
+ * Manages a pool of {@link OperatedClientConnection client connections} and
+ * is able to service connection requests from multiple execution threads.
+ * Connections are pooled on a per route basis. A request for a route which
+ * already the manager has persistent connections for available in the pool
+ * will be services by leasing a connection from the pool rather than
+ * creating a brand new connection.
*
- * This class is derived from MultiThreadedHttpConnectionManager
- * in HttpClient 3. See there for original authors.
- *
+ * The following parameters can be used to customize the behavior of this + * class: + *