Package org.apache.commons.httpclient
Interface HttpConnectionManager
-
- All Known Implementing Classes:
MultiThreadedHttpConnectionManager
,SimpleHttpConnectionManager
@Deprecated public interface HttpConnectionManager
Deprecated.Jakarta Commons HttpClient 3.x is deprecated in the Jenkins project. It is not recommended to use it in any new code. Instead, use HTTP client API plugins as a dependency in your code. E.g. Apache HttpComponents Client API 4.x Plugin or Async HTTP Client Plugin.An interface for classes that manage HttpConnections.- Since:
- 2.0
- See Also:
HttpConnection
,HttpClient(HttpConnectionManager)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description void
closeIdleConnections(long idleTimeout)
Deprecated.Closes connections that have been idle for at least the given amount of time.HttpConnection
getConnection(HostConfiguration hostConfiguration)
Deprecated.Gets an HttpConnection for a given host configuration.HttpConnection
getConnection(HostConfiguration hostConfiguration, long timeout)
Deprecated.Use #getConnectionWithTimeout(HostConfiguration, long)HttpConnection
getConnectionWithTimeout(HostConfiguration hostConfiguration, long timeout)
Deprecated.Gets an HttpConnection for a given host configuration.HttpConnectionManagerParams
getParams()
Deprecated.Returnsparameters
associated with this connection manager.void
releaseConnection(HttpConnection conn)
Deprecated.Releases the given HttpConnection for use by other requests.void
setParams(HttpConnectionManagerParams params)
Deprecated.Assignsparameters
for this connection manager.
-
-
-
Method Detail
-
getConnection
HttpConnection getConnection(HostConfiguration hostConfiguration)
Deprecated.Gets an HttpConnection for a given host configuration. If a connection is not available this method will block until one is. The connection manager should be registered with any HttpConnection that is created.- Parameters:
hostConfiguration
- the host configuration to use to configure the connection- Returns:
- an HttpConnection for the given configuration
- See Also:
HttpConnection.setHttpConnectionManager(HttpConnectionManager)
-
getConnection
HttpConnection getConnection(HostConfiguration hostConfiguration, long timeout) throws HttpException
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 connectiontimeout
- - 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- See Also:
HttpConnection.setHttpConnectionManager(HttpConnectionManager)
-
getConnectionWithTimeout
HttpConnection getConnectionWithTimeout(HostConfiguration hostConfiguration, long timeout) throws ConnectionPoolTimeoutException
Deprecated.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 connectiontimeout
- - 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
- See Also:
HttpConnection.setHttpConnectionManager(HttpConnectionManager)
-
releaseConnection
void releaseConnection(HttpConnection conn)
Deprecated.Releases the given HttpConnection for use by other requests.- Parameters:
conn
- - The HttpConnection to make available.
-
closeIdleConnections
void closeIdleConnections(long idleTimeout)
Deprecated.Closes connections that have been idle for at least the given amount of time. Only connections that are currently owned, not checked out, are subject to idle timeouts.- Parameters:
idleTimeout
- the minimum idle time, in milliseconds, for connections to be closed- Since:
- 3.0
-
getParams
HttpConnectionManagerParams getParams()
Deprecated.Returnsparameters
associated with this connection manager.- Since:
- 3.0
- See Also:
HttpConnectionManagerParams
-
setParams
void setParams(HttpConnectionManagerParams params)
Deprecated.Assignsparameters
for this connection manager.- Since:
- 3.0
- See Also:
HttpConnectionManagerParams
-
-