FileDocCategorySizeDatePackage
ClientConnectionRequest.javaAPI DocAndroid 1.5 API2910Wed May 06 22:41:10 BST 2009org.apache.http.conn

ClientConnectionRequest

public interface ClientConnectionRequest
Encapsulates a request for a {@link ManagedClientConnection}.

Fields Summary
Constructors Summary
Methods Summary
public voidabortRequest()
Aborts the call to {@link #getConnection(long, TimeUnit)}, causing it to throw an {@link InterruptedException}.

public org.apache.http.conn.ManagedClientConnectiongetConnection(long timeout, java.util.concurrent.TimeUnit tunit)
Obtains a connection within a given time. This method will block until a connection becomes available, the timeout expires, or the connection manager is {@link ClientConnectionManager#shutdown() shut down}. Timeouts are handled with millisecond precision. If {@link #abortRequest()} is called while this is blocking or before this began, an {@link InterruptedException} will be thrown.

param
timeout the timeout, 0 or negative for no timeout
param
tunit the unit for the timeout, may be null only if there is no timeout
return
a connection that can be used to communicate along the given route
throws
ConnectionPoolTimeoutException in case of a timeout
throws
InterruptedException if the calling thread is interrupted while waiting