|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.eviware.soapui.impl.wsdl.support.http.SoapUIMultiThreadedHttpConnectionManager
public class SoapUIMultiThreadedHttpConnectionManager
Manages a set of HttpConnections for various HostConfigurations. Modified to keep different pools for different keystores.
Nested Class Summary | |
---|---|
static class |
SoapUIMultiThreadedHttpConnectionManager.HttpConnectionAdapter
An HttpConnection wrapper that ensures a connection cannot be used once released. |
static class |
SoapUIMultiThreadedHttpConnectionManager.HttpConnectionWithReference
A connection that keeps a reference to itself. |
Field Summary | |
---|---|
static int |
DEFAULT_MAX_HOST_CONNECTIONS
The default maximum number of connections allowed per host |
static int |
DEFAULT_MAX_TOTAL_CONNECTIONS
The default maximum number of connections allowed overall |
Constructor Summary | |
---|---|
SoapUIMultiThreadedHttpConnectionManager()
No-args constructor |
Method Summary | |
---|---|
void |
closeIdleConnections(long idleTimeout)
|
void |
deleteClosedConnections()
Deletes all closed connections. |
org.apache.commons.httpclient.HttpConnection |
getConnection(org.apache.commons.httpclient.HostConfiguration hostConfiguration)
|
org.apache.commons.httpclient.HttpConnection |
getConnection(org.apache.commons.httpclient.HostConfiguration hostConfiguration,
long timeout)
Deprecated. Use #getConnectionWithTimeout(HostConfiguration, long) |
int |
getConnectionsInPool()
Gets the total number of pooled connections. |
int |
getConnectionsInPool(org.apache.commons.httpclient.HostConfiguration hostConfiguration)
Gets the total number of pooled connections for the given host configuration. |
int |
getConnectionsInUse()
Deprecated. Use getConnectionsInPool() |
int |
getConnectionsInUse(org.apache.commons.httpclient.HostConfiguration hostConfiguration)
Deprecated. Use getConnectionsInPool(HostConfiguration) |
org.apache.commons.httpclient.HttpConnection |
getConnectionWithTimeout(org.apache.commons.httpclient.HostConfiguration hostConfiguration,
long timeout)
Gets a connection or waits if one is not available. |
int |
getMaxConnectionsPerHost()
Deprecated. Use HttpConnectionManagerParams.getDefaultMaxConnectionsPerHost()
, HttpConnectionManager.getParams() . |
int |
getMaxTotalConnections()
Deprecated. Use HttpConnectionManagerParams.getMaxTotalConnections() ,
HttpConnectionManager.getParams() . |
org.apache.commons.httpclient.params.HttpConnectionManagerParams |
getParams()
Returns parameters associated with
this connection manager. |
boolean |
isConnectionStaleCheckingEnabled()
Deprecated. Use HttpConnectionParams.isStaleCheckingEnabled() ,
HttpConnectionManager.getParams() . |
void |
releaseConnection(org.apache.commons.httpclient.HttpConnection conn)
Make the given HttpConnection available for use by other requests. |
void |
setConnectionStaleCheckingEnabled(boolean connectionStaleCheckingEnabled)
Deprecated. Use HttpConnectionParams.setStaleCheckingEnabled(boolean)
, HttpConnectionManager.getParams() . |
void |
setMaxConnectionsPerHost(int maxHostConnections)
Deprecated. Use HttpConnectionManagerParams.setDefaultMaxConnectionsPerHost(int)
, HttpConnectionManager.getParams() . |
void |
setMaxTotalConnections(int maxTotalConnections)
Deprecated. Use HttpConnectionManagerParams.setMaxTotalConnections(int)
, HttpConnectionManager.getParams() . |
void |
setParams(org.apache.commons.httpclient.params.HttpConnectionManagerParams params)
Assigns parameters for this connection
manager. |
void |
shutdown()
Shuts down the connection manager and releases all resources. |
static void |
shutdownAll()
Shuts down and cleans up resources used by all instances of MultiThreadedHttpConnectionManager. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int DEFAULT_MAX_HOST_CONNECTIONS
public static final int DEFAULT_MAX_TOTAL_CONNECTIONS
Constructor Detail |
---|
public SoapUIMultiThreadedHttpConnectionManager()
Method Detail |
---|
public static void shutdownAll()
shutdown()
is called on all live
instances of MultiThreadedHttpConnectionManager.
shutdown()
public void shutdown()
The connection manager can no longer be used once shut down.
Calling this method more than once will have no effect.
public boolean isConnectionStaleCheckingEnabled()
HttpConnectionParams.isStaleCheckingEnabled()
,
HttpConnectionManager.getParams()
.
true
if stale checking will be enabled on
HttpConnectionsHttpConnection.isStaleCheckingEnabled()
public void setConnectionStaleCheckingEnabled(boolean connectionStaleCheckingEnabled)
HttpConnectionParams.setStaleCheckingEnabled(boolean)
, HttpConnectionManager.getParams()
.
connectionStaleCheckingEnabled
- true
if stale checking will be enabled on
HttpConnectionsHttpConnection.setStaleCheckingEnabled(boolean)
public void setMaxConnectionsPerHost(int maxHostConnections)
HttpConnectionManagerParams.setDefaultMaxConnectionsPerHost(int)
, HttpConnectionManager.getParams()
.
maxHostConnections
- the number of connections allowed for each hostConfigurationpublic int getMaxConnectionsPerHost()
HttpConnectionManagerParams.getDefaultMaxConnectionsPerHost()
, HttpConnectionManager.getParams()
.
public void setMaxTotalConnections(int maxTotalConnections)
HttpConnectionManagerParams.setMaxTotalConnections(int)
, HttpConnectionManager.getParams()
.
maxTotalConnections
- the maximum number of connections allowedpublic int getMaxTotalConnections()
HttpConnectionManagerParams.getMaxTotalConnections()
,
HttpConnectionManager.getParams()
.
public org.apache.commons.httpclient.HttpConnection getConnection(org.apache.commons.httpclient.HostConfiguration hostConfiguration)
getConnection
in interface org.apache.commons.httpclient.HttpConnectionManager
HttpConnectionManager.getConnection(HostConfiguration)
public org.apache.commons.httpclient.HttpConnection getConnectionWithTimeout(org.apache.commons.httpclient.HostConfiguration hostConfiguration, long timeout) throws org.apache.commons.httpclient.ConnectionPoolTimeoutException
getConnectionWithTimeout
in interface org.apache.commons.httpclient.HttpConnectionManager
hostConfiguration
- The host configuration specifying the connection details.timeout
- the number of milliseconds to wait for a connection, 0 to wait
indefinitely
org.apache.commons.httpclient.HttpException
- if a connection does not become available in 'timeout'
milliseconds
org.apache.commons.httpclient.ConnectionPoolTimeoutException
public org.apache.commons.httpclient.HttpConnection getConnection(org.apache.commons.httpclient.HostConfiguration hostConfiguration, long timeout) throws org.apache.commons.httpclient.HttpException
getConnection
in interface org.apache.commons.httpclient.HttpConnectionManager
org.apache.commons.httpclient.HttpException
HttpConnectionManager.getConnection(HostConfiguration, long)
public int getConnectionsInPool(org.apache.commons.httpclient.HostConfiguration hostConfiguration)
maximum number of connections per host
.
hostConfiguration
- The host configuration
public int getConnectionsInPool()
maximum number of connections
.
public int getConnectionsInUse(org.apache.commons.httpclient.HostConfiguration hostConfiguration)
getConnectionsInPool(HostConfiguration)
hostConfiguration
- the key that connections are tracked on
public int getConnectionsInUse()
getConnectionsInPool()
public void deleteClosedConnections()
HttpConnection.isOpen()
public void closeIdleConnections(long idleTimeout)
closeIdleConnections
in interface org.apache.commons.httpclient.HttpConnectionManager
public void releaseConnection(org.apache.commons.httpclient.HttpConnection conn)
releaseConnection
in interface org.apache.commons.httpclient.HttpConnectionManager
conn
- the HttpConnection to make available.public org.apache.commons.httpclient.params.HttpConnectionManagerParams getParams()
parameters
associated with
this connection manager.
getParams
in interface org.apache.commons.httpclient.HttpConnectionManager
HttpConnectionManagerParams
public void setParams(org.apache.commons.httpclient.params.HttpConnectionManagerParams params)
parameters
for this connection
manager.
setParams
in interface org.apache.commons.httpclient.HttpConnectionManager
HttpConnectionManagerParams
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |