Class IdleConnectionTimeoutThread
- java.lang.Object
 - 
- java.lang.Thread
 - 
- org.apache.commons.httpclient.util.IdleConnectionTimeoutThread
 
 
 
- 
- All Implemented Interfaces:
 java.lang.Runnable
@Deprecated public class IdleConnectionTimeoutThread extends java.lang.ThreadDeprecated.Jakarta Commons HttpClient 3.x is deprecated in the Jenkins project. It is not recommended to use it in any new code. Instead, use HTTP client API plugins as a dependency in your code. E.g. Apache HttpComponents Client API 4.x Plugin or Async HTTP Client Plugin.A utility class for periodically closing idle connections.- Since:
 - 3.0
 - See Also:
 HttpConnectionManager.closeIdleConnections(long)
 
- 
- 
Constructor Summary
Constructors Constructor Description IdleConnectionTimeoutThread()Deprecated. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddConnectionManager(HttpConnectionManager connectionManager)Deprecated.Adds a connection manager to be handled by this class.voidremoveConnectionManager(HttpConnectionManager connectionManager)Deprecated.Removes the connection manager from this class.voidrun()Deprecated.Closes idle connections.voidsetConnectionTimeout(long connectionTimeout)Deprecated.Sets the timeout value to use when testing for idle connections.voidsetTimeoutInterval(long timeoutInterval)Deprecated.Sets the interval used by this class between closing idle connections.voidshutdown()Deprecated.Stops the thread used to close idle connections.- 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield 
 - 
 
 - 
 
- 
- 
Method Detail
- 
addConnectionManager
public void addConnectionManager(HttpConnectionManager connectionManager)
Deprecated.Adds a connection manager to be handled by this class.HttpConnectionManager.closeIdleConnections(long)will be called on the connection manager everytimeoutIntervalmilliseconds.- Parameters:
 connectionManager- The connection manager to add
 
- 
removeConnectionManager
public void removeConnectionManager(HttpConnectionManager connectionManager)
Deprecated.Removes the connection manager from this class. The idle connections from the connection manager will no longer be automatically closed by this class.- Parameters:
 connectionManager- The connection manager to remove
 
- 
run
public void run()
Deprecated.Closes idle connections.- Specified by:
 runin interfacejava.lang.Runnable- Overrides:
 runin classjava.lang.Thread
 
- 
shutdown
public void shutdown()
Deprecated.Stops the thread used to close idle connections. This class cannot be used once shutdown. 
- 
setConnectionTimeout
public void setConnectionTimeout(long connectionTimeout)
Deprecated.Sets the timeout value to use when testing for idle connections.- Parameters:
 connectionTimeout- The connection timeout in milliseconds- See Also:
 HttpConnectionManager.closeIdleConnections(long)
 
- 
setTimeoutInterval
public void setTimeoutInterval(long timeoutInterval)
Deprecated.Sets the interval used by this class between closing idle connections. Idle connections will be closed everytimeoutIntervalmilliseconds.- Parameters:
 timeoutInterval- The timeout interval in milliseconds
 
 - 
 
 -