Android APIs
Added in API level 1
Deprecated since API level 22
public interface

ClientConnectionRequest

org.apache.http.conn.ClientConnectionRequest

This interface was deprecated in API level 22.
Please use openConnection() instead. Please visit this webpage for further details.

Class Overview

Encapsulates a request for a ManagedClientConnection.

Summary

Public Methods
abstract void abortRequest()
Aborts the call to getConnection(long, TimeUnit), causing it to throw an InterruptedException.
abstract ManagedClientConnection getConnection(long timeout, TimeUnit tunit)
Obtains a connection within a given time.

Public Methods

public abstract void abortRequest ()

Added in API level 1

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

public abstract ManagedClientConnection getConnection (long timeout, TimeUnit tunit)

Added in API level 1

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