|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.httpclient.SimpleHttpConnectionManager
public class SimpleHttpConnectionManager
A connection manager that provides access to a single HttpConnection. This manager makes no attempt to provide exclusive access to the contained HttpConnection.
Field Summary | |
---|---|
protected HttpConnection |
httpConnection
The http connection |
Constructor Summary | |
---|---|
SimpleHttpConnectionManager()
Do nothing constructor. |
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 |
getConnectionWithTimeout(HostConfiguration hostConfiguration,
long timeout)
Gets an HttpConnection for a given host configuration. |
HttpConnectionManagerParams |
getParams()
Returns parameters associated
with this connection manager. |
void |
releaseConnection(HttpConnection conn)
Releases the given HttpConnection for use by other requests. |
void |
setParams(HttpConnectionManagerParams params)
Assigns parameters for this
connection manager. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected HttpConnection httpConnection
Constructor Detail |
---|
public SimpleHttpConnectionManager()
Method Detail |
---|
public HttpConnection getConnection(HostConfiguration hostConfiguration)
HttpConnectionManager
getConnection
in interface HttpConnectionManager
hostConfiguration
- the host configuration to use to configure the
connection
HttpConnectionManager.getConnection(HostConfiguration)
public HttpConnection getConnectionWithTimeout(HostConfiguration hostConfiguration, long timeout)
HttpConnectionManager
getConnectionWithTimeout
in interface HttpConnectionManager
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
HttpConnectionManager.getConnectionWithTimeout(HostConfiguration, long)
public void releaseConnection(HttpConnection conn)
HttpConnectionManager
releaseConnection
in interface HttpConnectionManager
conn
- - The HttpConnection to make available.HttpConnectionManager.releaseConnection(org.apache.commons.httpclient.HttpConnection)
public HttpConnectionManagerParams getParams()
parameters
associated
with this connection manager.
getParams
in interface HttpConnectionManager
HttpConnectionManagerParams
public void setParams(HttpConnectionManagerParams params)
parameters
for this
connection manager.
setParams
in interface HttpConnectionManager
params
- params to setHttpConnectionManagerParams
public void closeIdleConnections(long idleTimeout)
closeIdleConnections
in interface HttpConnectionManager
idleTimeout
- the minimum idle time, in milliseconds, for connections to be closed
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |