- All Superinterfaces:
public interface ConnectionRequest extends CancellableRepresents a request for a
HttpClientConnectionwhose life cycle is managed by a connection manager.
All Methods Instance Methods Abstract Methods Modifier and Type Method Description
get(long timeout, java.util.concurrent.TimeUnit timeUnit)Obtains a connection within a given time.
Methods inherited from interface org.apache.http.concurrent.Cancellable
HttpClientConnection get(long timeout, java.util.concurrent.TimeUnit timeUnit) throws java.lang.InterruptedException, java.util.concurrent.ExecutionException, ConnectionPoolTimeoutExceptionObtains 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
Cancellable.cancel()is called while this is blocking or before this began, an
InterruptedExceptionwill be thrown.
timeout- the timeout, 0 or negative for no timeout
timeUnit- the unit for the
timeout, may be
nullonly if there is no timeout
- a connection that can be used to communicate along the given route
ConnectionPoolTimeoutException- in case of a timeout
java.lang.InterruptedException- if the calling thread is interrupted while waiting