org.apache.commons.httpclient
public interface HttpConnectionManager
Since: 2.0
See Also: HttpConnection
Method Summary | |
---|---|
void | closeIdleConnections(long idleTimeout)
Closes connections that have been idle for at least the given amount of time. |
HttpConnection | getConnection(HostConfiguration hostConfiguration)
Gets an HttpConnection for a given host configuration. |
HttpConnection | getConnection(HostConfiguration hostConfiguration, long timeout)
Gets an HttpConnection for a given host configuration. |
HttpConnection | getConnectionWithTimeout(HostConfiguration hostConfiguration, long timeout)
Gets an HttpConnection for a given host configuration. |
HttpConnectionManagerParams | getParams()
Returns {@link HttpConnectionManagerParams parameters} associated
with this connection manager.
|
void | releaseConnection(HttpConnection conn)
Releases the given HttpConnection for use by other requests.
|
void | setParams(HttpConnectionManagerParams params)
Assigns {@link HttpConnectionManagerParams parameters} for this
connection manager.
|
Parameters: idleTimeout the minimum idle time, in milliseconds, for connections to be closed
Since: 3.0
Parameters: hostConfiguration the host configuration to use to configure the connection
Returns: an HttpConnection for the given configuration
See Also: setHttpConnectionManager
Deprecated: Use #getConnectionWithTimeout(HostConfiguration, long)
Gets an HttpConnection for a given host configuration. If a connection is not available, this method will block for at most the specified number of milliseconds or until a connection becomes available. The connection manager should be registered with any HttpConnection that is created.Parameters: hostConfiguration the host configuration to use to configure the connection timeout - the time (in milliseconds) to wait for a connection to become available, 0 to specify an infinite timeout
Returns: an HttpConnection for the given configuraiton
Throws: HttpException if no connection becomes available before the timeout expires
Parameters: hostConfiguration the host configuration to use to configure the connection timeout - the time (in milliseconds) to wait for a connection to become available, 0 to specify an infinite timeout
Returns: an HttpConnection for the given configuraiton
Throws: ConnectionPoolTimeoutException if no connection becomes available before the timeout expires
Since: 3.0
Since: 3.0
See Also: HttpConnectionManagerParams
Parameters: conn - The HttpConnection to make available.
Since: 3.0
See Also: HttpConnectionManagerParams