Package org.apache.http.conn
Interface ClientConnectionRequest
Deprecated.
Encapsulates a request for a
ManagedClientConnection
.- Since:
- 4.0
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Deprecated.Aborts the call togetConnection(long, TimeUnit)
, causing it to throw anInterruptedException
.getConnection
(long timeout, TimeUnit timeUnit) Deprecated.Obtains a connection within a given time.
-
Method Details
-
getConnection
ManagedClientConnection getConnection(long timeout, TimeUnit timeUnit) throws InterruptedException, ConnectionPoolTimeoutException Deprecated.Obtains a connection within a given time. This method will block until a connection becomes available, the timeout expires, or the connection manager isshut down
. Timeouts are handled with millisecond precision. IfabortRequest()
is called while this is blocking or before this began, anInterruptedException
will be thrown.- Parameters:
timeout
- the timeout, 0 or negative for no timeouttimeUnit
- the unit for thetimeout
, may benull
only if there is no timeout- Returns:
- a connection that can be used to communicate along the given route
- Throws:
ConnectionPoolTimeoutException
- in case of a timeoutInterruptedException
- if the calling thread is interrupted while waiting
-
abortRequest
void abortRequest()Deprecated.Aborts the call togetConnection(long, TimeUnit)
, causing it to throw anInterruptedException
.
-
ConnectionRequest
.