Class PoolingHttpClientConnectionManager

java.lang.Object
org.apache.http.impl.conn.PoolingHttpClientConnectionManager
All Implemented Interfaces:
Closeable, AutoCloseable, HttpClientConnectionManager, ConnPoolControl<HttpRoute>

@ThreadSafe public class PoolingHttpClientConnectionManager extends Object implements HttpClientConnectionManager, ConnPoolControl<HttpRoute>, Closeable
ClientConnectionPoolManager maintains a pool of HttpClientConnections 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.

ClientConnectionPoolManager maintains a maximum limit of connection on a per route basis and in total. Per default this implementation will create no more than than 2 concurrent connections per given route and no more 20 connections in total. For many real-world applications these limits may prove too constraining, especially if they use HTTP as a transport protocol for their services. Connection limits, however, can be adjusted using ConnPoolControl methods.

Since:
4.3