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.
Modifier and Type | Method and Description |
---|---|
void |
closeExpiredConnections()
Deprecated.
Closes all expired connections in the pool.
|
void |
closeIdleConnections(long idletime,
TimeUnit tunit)
Deprecated.
Closes idle connections in the pool.
|
SchemeRegistry |
getSchemeRegistry()
Deprecated.
Obtains the scheme registry used by this manager.
|
void |
releaseConnection(ManagedClientConnection conn,
long validDuration,
TimeUnit timeUnit)
Deprecated.
Releases a connection for use by others.
|
ClientConnectionRequest |
requestConnection(HttpRoute route,
Object state)
Deprecated.
Returns a new
ClientConnectionRequest , from which a
ManagedClientConnection can be obtained or the request can be
aborted. |
void |
shutdown()
Deprecated.
Shuts down this connection manager and releases allocated resources.
|
SchemeRegistry getSchemeRegistry()
null
ClientConnectionRequest requestConnection(HttpRoute route, Object state)
ClientConnectionRequest
, from which a
ManagedClientConnection
can be obtained or the request can be
aborted.void releaseConnection(ManagedClientConnection conn, long validDuration, 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, TimeUnit tunit)
idletime
- the idle time of connections to be closedtunit
- the unit for the idletime
closeExpiredConnections()
void closeExpiredConnections()
void shutdown()
Copyright © 1999–2013 The Apache Software Foundation. All rights reserved.