|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.http.impl.conn.BasicClientConnectionManager
BasicHttpClientConnectionManager
.
@Contract(threading=SAFE) @Deprecated public class BasicClientConnectionManager
A connection manager for a single connection. This connection manager maintains only one active connection. Even though this class is fully thread-safe it ought to be used by one execution thread only, as only one thread a time can lease the connection at a time.
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
.
Field Summary | |
---|---|
static String |
MISUSE_MESSAGE
Deprecated. The message to be logged on multiple allocation. |
Constructor Summary | |
---|---|
BasicClientConnectionManager()
Deprecated. |
|
BasicClientConnectionManager(SchemeRegistry schreg)
Deprecated. Creates a new simple connection manager. |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String MISUSE_MESSAGE
Constructor Detail |
---|
public BasicClientConnectionManager(SchemeRegistry schreg)
schreg
- the scheme registrypublic BasicClientConnectionManager()
Method Detail |
---|
protected void finalize() throws Throwable
finalize
in class Object
Throwable
public SchemeRegistry getSchemeRegistry()
ClientConnectionManager
getSchemeRegistry
in interface ClientConnectionManager
null
protected ClientConnectionOperator createConnectionOperator(SchemeRegistry schreg)
public final ClientConnectionRequest requestConnection(HttpRoute route, Object state)
ClientConnectionManager
ClientConnectionRequest
, from which a
ManagedClientConnection
can be obtained or the request can be
aborted.
requestConnection
in interface ClientConnectionManager
public void releaseConnection(ManagedClientConnection conn, long keepalive, TimeUnit timeUnit)
ClientConnectionManager
releaseConnection
in interface ClientConnectionManager
conn
- 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()
ClientConnectionManager
closeExpiredConnections
in interface ClientConnectionManager
public void closeIdleConnections(long idletime, TimeUnit timeUnit)
ClientConnectionManager
closeIdleConnections
in interface ClientConnectionManager
idletime
- the idle time of connections to be closedtimeUnit
- the unit for the idletime
ClientConnectionManager.closeExpiredConnections()
public void shutdown()
ClientConnectionManager
shutdown
in interface ClientConnectionManager
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |