public class JMeterPoolingClientConnectionManager
extends java.lang.Object
implements org.apache.http.conn.ClientConnectionManager, org.apache.http.pool.ConnPoolControl<org.apache.http.conn.routing.HttpRoute>
PoolingClientConnectionManager with a slight modification
extracted from PoolingHttpClientConnectionManager to allow using
better validation mechanism introduced in 4.4
TODO : Remove when full upgrade to new HttpClient 4.5.X API is finished
Internal class, DO NOT USE| Constructor and Description |
|---|
JMeterPoolingClientConnectionManager() |
JMeterPoolingClientConnectionManager(org.apache.http.conn.scheme.SchemeRegistry schreg) |
JMeterPoolingClientConnectionManager(org.apache.http.conn.scheme.SchemeRegistry schreg,
org.apache.http.conn.DnsResolver dnsResolver) |
JMeterPoolingClientConnectionManager(org.apache.http.conn.scheme.SchemeRegistry schemeRegistry,
long timeToLive,
java.util.concurrent.TimeUnit tunit) |
JMeterPoolingClientConnectionManager(org.apache.http.conn.scheme.SchemeRegistry schemeRegistry,
long timeToLive,
java.util.concurrent.TimeUnit tunit,
org.apache.http.conn.DnsResolver dnsResolver) |
JMeterPoolingClientConnectionManager(org.apache.http.conn.scheme.SchemeRegistry schemeRegistry,
long timeToLive,
java.util.concurrent.TimeUnit tunit,
org.apache.http.conn.DnsResolver dnsResolver,
int validateAfterInactivity) |
| Modifier and Type | Method and Description |
|---|---|
void |
closeExpiredConnections() |
void |
closeIdleConnections(long idleTimeout,
java.util.concurrent.TimeUnit tunit) |
protected org.apache.http.conn.ClientConnectionOperator |
createConnectionOperator(org.apache.http.conn.scheme.SchemeRegistry schreg)
Hook for creating the connection operator.
|
protected void |
finalize() |
int |
getDefaultMaxPerRoute() |
protected org.apache.http.conn.DnsResolver |
getDnsResolver() |
int |
getMaxPerRoute(org.apache.http.conn.routing.HttpRoute route) |
int |
getMaxTotal() |
org.apache.http.conn.scheme.SchemeRegistry |
getSchemeRegistry() |
org.apache.http.pool.PoolStats |
getStats(org.apache.http.conn.routing.HttpRoute route) |
org.apache.http.pool.PoolStats |
getTotalStats() |
int |
getValidateAfterInactivity() |
void |
releaseConnection(org.apache.http.conn.ManagedClientConnection conn,
long keepalive,
java.util.concurrent.TimeUnit tunit) |
org.apache.http.conn.ClientConnectionRequest |
requestConnection(org.apache.http.conn.routing.HttpRoute route,
java.lang.Object state) |
void |
setDefaultMaxPerRoute(int max) |
void |
setMaxPerRoute(org.apache.http.conn.routing.HttpRoute route,
int max) |
void |
setMaxTotal(int max) |
void |
setValidateAfterInactivity(int ms)
Defines period of inactivity in milliseconds after which persistent connections must
be re-validated prior to being
leased to the consumer. |
void |
shutdown() |
public JMeterPoolingClientConnectionManager(org.apache.http.conn.scheme.SchemeRegistry schreg)
public JMeterPoolingClientConnectionManager(org.apache.http.conn.scheme.SchemeRegistry schreg,
org.apache.http.conn.DnsResolver dnsResolver)
public JMeterPoolingClientConnectionManager()
public JMeterPoolingClientConnectionManager(org.apache.http.conn.scheme.SchemeRegistry schemeRegistry,
long timeToLive,
java.util.concurrent.TimeUnit tunit)
public JMeterPoolingClientConnectionManager(org.apache.http.conn.scheme.SchemeRegistry schemeRegistry,
long timeToLive,
java.util.concurrent.TimeUnit tunit,
org.apache.http.conn.DnsResolver dnsResolver)
public JMeterPoolingClientConnectionManager(org.apache.http.conn.scheme.SchemeRegistry schemeRegistry,
long timeToLive,
java.util.concurrent.TimeUnit tunit,
org.apache.http.conn.DnsResolver dnsResolver,
int validateAfterInactivity)
public int getValidateAfterInactivity()
setValidateAfterInactivity(int)public void setValidateAfterInactivity(int ms)
leased to the consumer. Non-positive value passed
to this method disables connection validation. This check helps detect connections
that have become stale (half-closed) while kept inactive in the pool.ms - period of inactivity in msleaseConnection(java.util.concurrent.Future, long, java.util.concurrent.TimeUnit)protected void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.Throwableprotected org.apache.http.conn.ClientConnectionOperator createConnectionOperator(org.apache.http.conn.scheme.SchemeRegistry schreg)
DefaultClientConnectionOperator.schreg - the scheme registry.public org.apache.http.conn.scheme.SchemeRegistry getSchemeRegistry()
getSchemeRegistry in interface org.apache.http.conn.ClientConnectionManagerpublic org.apache.http.conn.ClientConnectionRequest requestConnection(org.apache.http.conn.routing.HttpRoute route,
java.lang.Object state)
requestConnection in interface org.apache.http.conn.ClientConnectionManagerpublic void releaseConnection(org.apache.http.conn.ManagedClientConnection conn,
long keepalive,
java.util.concurrent.TimeUnit tunit)
releaseConnection in interface org.apache.http.conn.ClientConnectionManagerpublic void shutdown()
shutdown in interface org.apache.http.conn.ClientConnectionManagerpublic void closeIdleConnections(long idleTimeout,
java.util.concurrent.TimeUnit tunit)
closeIdleConnections in interface org.apache.http.conn.ClientConnectionManagerpublic void closeExpiredConnections()
closeExpiredConnections in interface org.apache.http.conn.ClientConnectionManagerpublic int getMaxTotal()
getMaxTotal in interface org.apache.http.pool.ConnPoolControl<org.apache.http.conn.routing.HttpRoute>public void setMaxTotal(int max)
setMaxTotal in interface org.apache.http.pool.ConnPoolControl<org.apache.http.conn.routing.HttpRoute>public int getDefaultMaxPerRoute()
getDefaultMaxPerRoute in interface org.apache.http.pool.ConnPoolControl<org.apache.http.conn.routing.HttpRoute>public void setDefaultMaxPerRoute(int max)
setDefaultMaxPerRoute in interface org.apache.http.pool.ConnPoolControl<org.apache.http.conn.routing.HttpRoute>public int getMaxPerRoute(org.apache.http.conn.routing.HttpRoute route)
getMaxPerRoute in interface org.apache.http.pool.ConnPoolControl<org.apache.http.conn.routing.HttpRoute>public void setMaxPerRoute(org.apache.http.conn.routing.HttpRoute route,
int max)
setMaxPerRoute in interface org.apache.http.pool.ConnPoolControl<org.apache.http.conn.routing.HttpRoute>public org.apache.http.pool.PoolStats getTotalStats()
getTotalStats in interface org.apache.http.pool.ConnPoolControl<org.apache.http.conn.routing.HttpRoute>public org.apache.http.pool.PoolStats getStats(org.apache.http.conn.routing.HttpRoute route)
getStats in interface org.apache.http.pool.ConnPoolControl<org.apache.http.conn.routing.HttpRoute>protected org.apache.http.conn.DnsResolver getDnsResolver()
Copyright © 1998-2018 Apache Software Foundation. All Rights Reserved.