HttpClientConnectionManager.@Deprecated
public interface ClientConnectionManager
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.
| 限定符和类型 | 方法和说明 |
|---|---|
void |
closeExpiredConnections()
已过时。
Closes all expired connections in the pool.
|
void |
closeIdleConnections(long idletime,
java.util.concurrent.TimeUnit tunit)
已过时。
Closes idle connections in the pool.
|
SchemeRegistry |
getSchemeRegistry()
已过时。
Obtains the scheme registry used by this manager.
|
void |
releaseConnection(ManagedClientConnection conn,
long validDuration,
java.util.concurrent.TimeUnit timeUnit)
已过时。
Releases a connection for use by others.
|
ClientConnectionRequest |
requestConnection(HttpRoute route,
java.lang.Object state)
已过时。
Returns a new
ClientConnectionRequest, from which a
ManagedClientConnection can be obtained or the request can be
aborted. |
void |
shutdown()
已过时。
Shuts down this connection manager and releases tlb resources.
|
SchemeRegistry getSchemeRegistry()
nullClientConnectionRequest requestConnection(HttpRoute route, java.lang.Object state)
ClientConnectionRequest, from which a
ManagedClientConnection can be obtained or the request can be
aborted.void releaseConnection(ManagedClientConnection conn, long validDuration, java.util.concurrent.TimeUnit timeUnit)
conn - the connection to releasevalidDuration - the duration of time this connection is valid for reusetimeUnit - the unit of time validDuration is measured incloseExpiredConnections()void closeIdleConnections(long idletime,
java.util.concurrent.TimeUnit tunit)
idletime - the idle time of connections to be closedtunit - the unit for the idletimecloseExpiredConnections()void closeExpiredConnections()
void shutdown()