BasicHttpClientConnectionManager.@Contract(threading=SAFE) @Deprecated public class BasicClientConnectionManager extends Object implements ClientConnectionManager
This connection manager will make an effort to reuse the connection for subsequent requests
with the same route. It will, however, close the existing connection and
open it for the given route, if the route of the persistent connection does not match that
of the connection request. If the connection has been already been allocated
IllegalStateException is thrown.
This connection manager implementation should be used inside an EJB container instead of
PoolingClientConnectionManager.
| Modifier and Type | Field and Description |
|---|---|
static String |
MISUSE_MESSAGE
Deprecated.
The message to be logged on multiple allocation.
|
| Constructor and Description |
|---|
BasicClientConnectionManager()
Deprecated.
|
BasicClientConnectionManager(SchemeRegistry schreg)
Deprecated.
Creates a new simple connection manager.
|
| Modifier and Type | Method and Description |
|---|---|
void |
closeExpiredConnections()
Deprecated.
Closes all expired connections in the pool.
|
void |
closeIdleConnections(long idletime,
TimeUnit timeUnit)
Deprecated.
Closes idle connections in the pool.
|
protected ClientConnectionOperator |
createConnectionOperator(SchemeRegistry schreg)
Deprecated.
|
protected void |
finalize()
Deprecated.
|
SchemeRegistry |
getSchemeRegistry()
Deprecated.
Obtains the scheme registry used by this manager.
|
void |
releaseConnection(ManagedClientConnection conn,
long keepalive,
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.
|
public static final String MISUSE_MESSAGE
public BasicClientConnectionManager(SchemeRegistry schreg)
schreg - the scheme registrypublic BasicClientConnectionManager()
protected void finalize()
throws Throwable
public SchemeRegistry getSchemeRegistry()
ClientConnectionManagergetSchemeRegistry in interface ClientConnectionManagernullprotected ClientConnectionOperator createConnectionOperator(SchemeRegistry schreg)
public final ClientConnectionRequest requestConnection(HttpRoute route, Object state)
ClientConnectionManagerClientConnectionRequest, from which a
ManagedClientConnection can be obtained or the request can be
aborted.requestConnection in interface ClientConnectionManagerpublic void releaseConnection(ManagedClientConnection conn, long keepalive, TimeUnit timeUnit)
ClientConnectionManagerreleaseConnection in interface ClientConnectionManagerconn - the connection to releasekeepalive - the duration of time this connection is valid for reusetimeUnit - the unit of time validDuration is measured inClientConnectionManager.closeExpiredConnections()public void closeExpiredConnections()
ClientConnectionManagercloseExpiredConnections in interface ClientConnectionManagerpublic void closeIdleConnections(long idletime,
TimeUnit timeUnit)
ClientConnectionManagercloseIdleConnections in interface ClientConnectionManageridletime - the idle time of connections to be closedtimeUnit - the unit for the idletimeClientConnectionManager.closeExpiredConnections()public void shutdown()
ClientConnectionManagershutdown in interface ClientConnectionManagerCopyright © 1999–2022 The Apache Software Foundation. All rights reserved.