org.apache.commons.httpclient

Class SimpleHttpConnectionManager

public class SimpleHttpConnectionManager extends Object implements HttpConnectionManager

A connection manager that provides access to a single HttpConnection. This manager makes no attempt to provide exclusive access to the contained HttpConnection.

Since: 2.0

Author: Michael Becke Eric Johnson Mike Bowler Oleg Kalnichevski Laura Werner

Field Summary
protected HttpConnectionhttpConnection
The http connection
Constructor Summary
SimpleHttpConnectionManager()
Method Summary
voidcloseIdleConnections(long idleTimeout)
HttpConnectiongetConnection(HostConfiguration hostConfiguration)
HttpConnectiongetConnection(HostConfiguration hostConfiguration, long timeout)
HttpConnectiongetConnectionWithTimeout(HostConfiguration hostConfiguration, long timeout)
HttpConnectionManagerParamsgetParams()
Returns {@link HttpConnectionManagerParams parameters} associated with this connection manager.
booleanisConnectionStaleCheckingEnabled()
Gets the staleCheckingEnabled value to be set on HttpConnections that are created.
voidreleaseConnection(HttpConnection conn)
voidsetConnectionStaleCheckingEnabled(boolean connectionStaleCheckingEnabled)
Sets the staleCheckingEnabled value to be set on HttpConnections that are created.
voidsetParams(HttpConnectionManagerParams params)
Assigns {@link HttpConnectionManagerParams parameters} for this connection manager.

Field Detail

httpConnection

protected HttpConnection httpConnection
The http connection

Constructor Detail

SimpleHttpConnectionManager

public SimpleHttpConnectionManager()

Method Detail

closeIdleConnections

public void closeIdleConnections(long idleTimeout)

Since: 3.0

getConnection

public HttpConnection getConnection(HostConfiguration hostConfiguration)

See Also: getConnection

getConnection

public HttpConnection getConnection(HostConfiguration hostConfiguration, long timeout)

Deprecated: Use #getConnectionWithTimeout(HostConfiguration, long)

See Also:

getConnectionWithTimeout

public HttpConnection getConnectionWithTimeout(HostConfiguration hostConfiguration, long timeout)

Since: 3.0

See Also:

getParams

public HttpConnectionManagerParams getParams()
Returns {@link HttpConnectionManagerParams parameters} associated with this connection manager.

Since: 2.1

See Also: HttpConnectionManagerParams

isConnectionStaleCheckingEnabled

public boolean isConnectionStaleCheckingEnabled()

Deprecated: Use {@link HttpConnectionManagerParams#isStaleCheckingEnabled()}, {@link HttpConnectionManager#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

public void releaseConnection(HttpConnection conn)

See Also: releaseConnection

setConnectionStaleCheckingEnabled

public void setConnectionStaleCheckingEnabled(boolean connectionStaleCheckingEnabled)

Deprecated: Use {@link HttpConnectionManagerParams#setStaleCheckingEnabled(boolean)}, {@link HttpConnectionManager#getParams()}.

Sets the staleCheckingEnabled value to be set on HttpConnections that are created.

Parameters: connectionStaleCheckingEnabled true if stale checking will be enabled on HttpConections

See Also:

setParams

public void setParams(HttpConnectionManagerParams params)
Assigns {@link HttpConnectionManagerParams parameters} for this connection manager.

Since: 2.1

See Also: HttpConnectionManagerParams

Copyright (c) 1999-2005 - Apache Software Foundation