org.apache.commons.httpclient
public class SimpleHttpConnectionManager extends Object implements HttpConnectionManager
Since: 2.0
Field Summary | |
---|---|
protected HttpConnection | httpConnection The http connection |
Constructor Summary | |
---|---|
SimpleHttpConnectionManager(boolean alwaysClose)
The connection manager created with this constructor will try to keep the
connection open (alive) between consecutive requests if the alwaysClose
parameter is set to false. | |
SimpleHttpConnectionManager()
The connection manager created with this constructor will always try to keep
the connection open (alive) between consecutive requests. |
Method Summary | |
---|---|
void | closeIdleConnections(long idleTimeout) |
HttpConnection | getConnection(HostConfiguration hostConfiguration) |
HttpConnection | getConnection(HostConfiguration hostConfiguration, long timeout) |
HttpConnection | getConnectionWithTimeout(HostConfiguration hostConfiguration, long timeout)
This method always returns the same connection object. |
HttpConnectionManagerParams | getParams()
Returns parameters associated
with this connection manager.
|
boolean | isConnectionStaleCheckingEnabled()
Gets the staleCheckingEnabled value to be set on HttpConnections that are created.
|
void | releaseConnection(HttpConnection conn) |
void | setConnectionStaleCheckingEnabled(boolean connectionStaleCheckingEnabled)
Sets the staleCheckingEnabled value to be set on HttpConnections that are created.
|
void | setParams(HttpConnectionManagerParams params)
Assigns parameters for this
connection manager.
|
void | shutdown()
since 3.1 |
Parameters: alwaysClose if set true, the connection manager will always close connections upon release.
Since: 3.0
See Also: getConnection
Parameters: hostConfiguration The host configuration specifying the connection details. timeout this parameter has no effect. The connection is always returned immediately.
Since: 3.0
parameters
associated
with this connection manager.
Since: 2.1
See Also: HttpConnectionManagerParams
Deprecated: Use HttpConnectionManagerParams, getParams.
Gets the staleCheckingEnabled value to be set on HttpConnections that are created.Returns: true
if stale checking will be enabled on HttpConections
See Also: releaseConnection
Deprecated: Use HttpConnectionManagerParams, getParams.
Sets the staleCheckingEnabled value to be set on HttpConnections that are created.Parameters: connectionStaleCheckingEnabled true
if stale checking will be enabled
on HttpConections