Package org.apache.http.impl.conn.tsccm
Interface PoolEntryRequest
public interface PoolEntryRequest
Encapsulates a request for a
BasicPoolEntry.-
Method Summary
Modifier and Type Method Description voidabortRequest()Aborts the active or next call togetPoolEntry(long, TimeUnit).BasicPoolEntrygetPoolEntry(long timeout, TimeUnit tunit)Obtains a pool entry with a connection within the given timeout.
-
Method Details
-
getPoolEntry
BasicPoolEntry getPoolEntry(long timeout, TimeUnit tunit) throws InterruptedException, ConnectionPoolTimeoutExceptionObtains a pool entry with a connection within the given timeout. IfabortRequest()is called before this completes anInterruptedExceptionis thrown.- Parameters:
timeout- the timeout, 0 or negative for no timeouttunit- the unit for thetimeout, may benullonly if there is no timeout- Returns:
- pool entry holding a connection for the route
- Throws:
ConnectionPoolTimeoutException- if the timeout expiredInterruptedException- if the calling thread was interrupted or the request was aborted
-
abortRequest
void abortRequest()Aborts the active or next call togetPoolEntry(long, TimeUnit).
-