org.jasig.apache.http.impl.conn
Class CleanShutdownPoolingClientConnectionManager
java.lang.Object
org.apache.http.impl.conn.PoolingClientConnectionManager
org.jasig.apache.http.impl.conn.CleanShutdownPoolingClientConnectionManager
- All Implemented Interfaces:
- org.apache.http.conn.ClientConnectionManager, org.apache.http.pool.ConnPoolControl<org.apache.http.conn.routing.HttpRoute>
public class CleanShutdownPoolingClientConnectionManager
- extends org.apache.http.impl.conn.PoolingClientConnectionManager
Extension of PoolingClientConnectionManager that spawns a monitoring thread to facilitate timely shutdown.
- Version:
- $Revision: 1.1 $
- Author:
- Eric Dalquist
|
Field Summary |
protected org.slf4j.Logger |
logger
|
| Methods inherited from class org.apache.http.impl.conn.PoolingClientConnectionManager |
closeExpiredConnections, closeIdleConnections, createConnectionOperator, finalize, getDefaultMaxPerRoute, getMaxPerRoute, getMaxTotal, getSchemeRegistry, getStats, getTotalStats, releaseConnection, requestConnection, setDefaultMaxPerRoute, setMaxPerRoute, setMaxTotal |
logger
protected final org.slf4j.Logger logger
CleanShutdownPoolingClientConnectionManager
public CleanShutdownPoolingClientConnectionManager()
CleanShutdownPoolingClientConnectionManager
public CleanShutdownPoolingClientConnectionManager(org.apache.http.conn.scheme.SchemeRegistry schreg,
org.apache.http.conn.DnsResolver dnsResolver)
CleanShutdownPoolingClientConnectionManager
public CleanShutdownPoolingClientConnectionManager(org.apache.http.conn.scheme.SchemeRegistry schemeRegistry,
long timeToLive,
TimeUnit tunit,
org.apache.http.conn.DnsResolver dnsResolver)
CleanShutdownPoolingClientConnectionManager
public CleanShutdownPoolingClientConnectionManager(org.apache.http.conn.scheme.SchemeRegistry schemeRegistry,
long timeToLive,
TimeUnit tunit)
CleanShutdownPoolingClientConnectionManager
public CleanShutdownPoolingClientConnectionManager(org.apache.http.conn.scheme.SchemeRegistry schreg)
setShutdownThreadKillTime
public void setShutdownThreadKillTime(int shutdownThreadKillTime)
- Hard limit time for shutting down the connection manager.
Once hit the shutdown thread is killed via
Thread.stop().
Defaults to 45s (45000ms)
setShutdownThreadMaxTime
public void setShutdownThreadMaxTime(int shutdownThreadMaxTime)
- Limit after which the shutdown thread is repeatedly interrupted.
Defaults to 30s (30000ms)
setShutdownThreadMaxWaitTime
public void setShutdownThreadMaxWaitTime(int shutdownThreadMaxWaitTime)
- Limit of time the shutdown thread is allowed to stay in
Thread.State.BLOCKED, Thread.State.WAITING, or
Thread.State.TIMED_WAITING. Once hit the thread is interrupted and the timer is reset.
Defaults to 1s (1000ms)
setShutdownThreadPollRate
public void setShutdownThreadPollRate(int shutdownThreadPollRate)
- Rate at which the state of the shutdown thread is polled and/or interrupted.
Defaults to 5ms
shutdown
public void shutdown()
- Specified by:
shutdown in interface org.apache.http.conn.ClientConnectionManager- Overrides:
shutdown in class org.apache.http.impl.conn.PoolingClientConnectionManager
Copyright © 2013 Jasig. All Rights Reserved.