|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.commons.httpclient.MultiThreadedHttpConnectionManager
Manages a set of HttpConnections for various HostConfigurations.
Constructor Summary | |
MultiThreadedHttpConnectionManager()
No-args constructor |
Method Summary | |
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. |
int |
getConnectionsInUse(HostConfiguration hostConfiguration)
Get the number of connections in use for this configuration. |
int |
getMaxConnectionsPerHost()
Gets the maximum number of connections allowed for a given hostConfiguration. |
void |
releaseConnection(HttpConnection conn)
Make the given HttpConnection available for use by other requests. |
void |
setMaxConnectionsPerHost(int maxConnections)
Sets the maximum number of connections allowed for a given HostConfiguration. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public MultiThreadedHttpConnectionManager()
Method Detail |
public void setMaxConnectionsPerHost(int maxConnections)
maxConnections
- the number of connections allowed for each
hostConfigurationpublic int getMaxConnectionsPerHost()
public HttpConnection getConnection(HostConfiguration hostConfiguration)
HttpConnectionManager.getConnection(HostConfiguration)
public HttpConnection getConnection(HostConfiguration hostConfiguration, long timeout) throws HttpException
HttpConnectionManager.getConnection(HostConfiguration, long)
public int getConnectionsInUse(HostConfiguration hostConfiguration)
hostConfiguration
- the key that connections are tracked onpublic void releaseConnection(HttpConnection conn)
conn
- the HttpConnection to make available.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |