Top Description Methods
org.apache.http.pool

public Interface ConnPool<T, E>

Known Direct Implementers
org.apache.http.pool.AbstractConnPool
Type Parameters
<T>
the route type that represents the opposite endpoint of a pooled connection.
<E>
the type of the pool entry containing a pooled connection.
Imports
java.util.concurrent.Future, org.apache.http.concurrent.FutureCallback

ConnPool represents a shared pool connections can be leased from and released back to.
Since
4.2

Method Summary

Modifier and TypeMethod and Description
public Future<E>

Returns:

future for a leased pool entry.
lease
(final T
route of the connection.
route
,
final Object
arbitrary object that represents a particular state (usually a security principal or a unique token identifying the user whose credentials have been used while establishing the connection). May be null.
state
,
final FutureCallback<E>
operation completion callback.
callback
)

Attempts to lease a connection for the given route and with the given state from the pool.

public void
release(E
pool entry leased from the pool
entry
,
boolean
flag indicating whether or not the released connection is in a consistent state and is safe for further use.
reusable
)

Releases the pool entry back to the pool.

Method Detail

leaseback to summary
public Future<E> lease(final T route, final Object state, final FutureCallback<E> callback)

Attempts to lease a connection for the given route and with the given state from the pool.

Parameters
route:T

route of the connection.

state:Object

arbitrary object that represents a particular state (usually a security principal or a unique token identifying the user whose credentials have been used while establishing the connection). May be null.

callback:FutureCallback<E>

operation completion callback.

Returns:Future<E>

future for a leased pool entry.

releaseback to summary
public void release(E entry, boolean reusable)

Releases the pool entry back to the pool.

Parameters
entry:E

pool entry leased from the pool

reusable:boolean

flag indicating whether or not the released connection is in a consistent state and is safe for further use.