public interface ConnectionRequest extends Cancellable
HttpClientConnection
whose life cycle
is managed by a connection manager.Modifier and Type | Method and Description |
---|---|
HttpClientConnection |
get(long timeout,
java.util.concurrent.TimeUnit tunit)
Obtains a connection within a given time.
|
cancel
HttpClientConnection get(long timeout, java.util.concurrent.TimeUnit tunit) throws java.lang.InterruptedException, java.util.concurrent.ExecutionException, ConnectionPoolTimeoutException
Cancellable.cancel()
is called while this is blocking or
before this began, an InterruptedException
will
be thrown.timeout
- the timeout, 0 or negative for no timeouttunit
- the unit for the timeout
,
may be null
only if there is no timeoutConnectionPoolTimeoutException
- in case of a timeoutjava.lang.InterruptedException
- if the calling thread is interrupted while waitingjava.util.concurrent.ExecutionException