Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.http.conn
Interface ClientConnectionRequest

    public interface ClientConnectionRequest

Encapsulates a request for a `ManagedClientConnection`.

Since:
  4.0

Method Summary
`void` | `abortRequest()` Aborts the call to `getConnection(long, TimeUnit)`, causing it to throw an `InterruptedException`.
`ManagedClientConnection` | `getConnection(long timeout, TimeUnit tunit)` Obtains a connection within a given time.

Method Detail

### getConnection

    ManagedClientConnection getConnection(long timeout,
                                          TimeUnit tunit)
                                          throws InterruptedException,
                                                 ConnectionPoolTimeoutException

  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` - the timeout, 0 or negative for no timeout
    `tunit` - the unit for the `timeout`, may be `null` 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 timeout
    `InterruptedException` - if the calling thread is interrupted while waiting

### abortRequest

    void abortRequest()

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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 1999-2013 The Apache Software Foundation. All Rights Reserved.