Deprecated
(4.3) replaced by HttpClientConnectionManager.
client connections.
The purpose of an HTTP connection manager is to serve as a factory for new
HTTP connections, manage persistent connections and synchronize access to
persistent connections making sure that only one thread of execution can
have access to a connection at a time.
Implementations of this interface must be thread-safe. Access to shared data must be synchronized as methods of this interface may be executed from multiple threads.
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | closeIdleConnections(long
the idle time of connections to be closed idletime, TimeUnit the unit for the timeUnit)idletimeCloses idle connections in the pool. |
| public SchemeRegistry | Returns: the scheme registry, nevernull
Deprecated
as a consequence of
Obtains the scheme registry used by this manager.
SchemeRegistry being deprecated.
|
| public void | releaseConnection(ManagedClientConnection
the connection to release conn, long the duration of time this connection is valid for reuse validDuration, TimeUnit the unit of time validDuration is measured in timeUnit)
Deprecated
as a consequence of
Releases a connection for use by others.
ManagedClientConnection being deprecated.
|
| public ClientConnectionRequest | requestConnection(HttpRoute route, Object state)
Deprecated
as a consequence of
Returns a new ClientConnectionRequest being deprecated.
ClientConnectionRequest, from which a
ManagedClientConnection can be obtained or the request can be
aborted.
|
| public void |
| closeExpiredConnections | back to summary |
|---|---|
| public void closeExpiredConnections() Closes all expired connections in the pool. Open connections in the pool that have not been used for the timespan defined when the connection was released will be closed. Currently allocated connections are not subject to this method. Times will be checked with milliseconds precision. | |
| closeIdleConnections | back to summary |
|---|---|
| public void closeIdleConnections(long idletime, TimeUnit timeUnit) Closes idle connections in the pool. Open connections in the pool that have not been used for the timespan given by the argument will be closed. Currently allocated connections are not subject to this method. Times will be checked with milliseconds precision All expired connections will also be closed.
| |
| getSchemeRegistry | back to summary |
|---|---|
| public SchemeRegistry getSchemeRegistry()
Deprecated as a consequence of Obtains the scheme registry used by this manager.
| |
| releaseConnection | back to summary |
|---|---|
| public void releaseConnection(ManagedClientConnection conn, long validDuration, TimeUnit timeUnit)
Deprecated as a consequence of Releases a connection for use by others. You may optionally specify how long the connection is valid to be reused. Values <= 0 are considered to be valid forever. If the connection is not marked as reusable, the connection will not be reused regardless of the valid duration. If the connection has been released before, the call will be ignored.
| |
| requestConnection | back to summary |
|---|---|
| public ClientConnectionRequest requestConnection(HttpRoute route, Object state)
Deprecated as a consequence of Returns a new | |
| shutdown | back to summary |
|---|---|
| public void shutdown() Shuts down this connection manager and releases allocated resources. This includes closing all connections, whether they are currently used or not. | |