Top Description Methods
org.apache.http.conn

public Interface ClientConnectionRequest

Annotations
@Deprecated
Imports
java.util.concurrent.TimeUnit

Deprecated

(4.3) replaced by ConnectionRequest.

Encapsulates a request for a ManagedClientConnection.
Since
4.0

Method Summary

Modifier and TypeMethod and Description
public void
abortRequest()

Aborts the call to getConnection(long, TimeUnit), causing it to throw an InterruptedException.

public ManagedClientConnection

Returns:

a connection that can be used to communicate along the given route
getConnection
(long
the timeout, 0 or negative for no timeout
timeout
,
TimeUnit
the unit for the timeout, may be null only if there is no timeout
timeUnit
)

Deprecated as a consequence of ManagedClientConnection being deprecated.
Obtains a connection within a given time.

Method Detail

abortRequestback to summary
public void abortRequest()

Aborts the call to getConnection(long, TimeUnit), causing it to throw an InterruptedException.

getConnectionback to summary
public ManagedClientConnection getConnection(long timeout, TimeUnit timeUnit) throws InterruptedException, ConnectionPoolTimeoutException

Deprecated

as a consequence of ManagedClientConnection being deprecated. See corresponding docs for further information.

Obtains a connection within a given time. This method will block until a connection becomes available, the timeout expires, or the connection manager is shut down. Timeouts are handled with millisecond precision. If abortRequest() is called while this is blocking or before this began, an InterruptedException will be thrown.

Parameters
timeout:long

the timeout, 0 or negative for no timeout

timeUnit:TimeUnit

the unit for the timeout, may be null only if there is no timeout

Returns:ManagedClientConnection

a connection that can be used to communicate along the given route

Exceptions
InterruptedException:
if the calling thread is interrupted while waiting
ConnectionPoolTimeoutException:
in case of a timeout