public class IdleConnectionTimeoutThread
extends java.lang.Thread
HttpConnectionManager.closeIdleConnections(long)| Constructor | Description |
|---|---|
IdleConnectionTimeoutThread() |
| Modifier and Type | Method | Description |
|---|---|---|
void |
addConnectionManager(HttpConnectionManager connectionManager) |
Adds a connection manager to be handled by this class.
|
protected void |
handleCloseIdleConnections(HttpConnectionManager connectionManager) |
Handles calling
closeIdleConnections()
and doing any other cleanup work on the given connection mangaer. |
void |
removeConnectionManager(HttpConnectionManager connectionManager) |
Removes the connection manager from this class.
|
void |
run() |
Closes idle connections.
|
void |
setConnectionTimeout(long connectionTimeout) |
Sets the timeout value to use when testing for idle connections.
|
void |
setTimeoutInterval(long timeoutInterval) |
Sets the interval used by this class between closing idle connections.
|
void |
shutdown() |
Stops the thread used to close idle connections.
|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitactiveCount, checkAccess, clone, countStackFrames, currentThread, destroy, 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, stop, suspend, toString, yieldpublic void addConnectionManager(HttpConnectionManager connectionManager)
HttpConnectionManager.closeIdleConnections(long) will be called on the connection
manager every timeoutInterval milliseconds.connectionManager - The connection manager to addpublic void removeConnectionManager(HttpConnectionManager connectionManager)
connectionManager - The connection manager to removeprotected void handleCloseIdleConnections(HttpConnectionManager connectionManager)
closeIdleConnections()
and doing any other cleanup work on the given connection mangaer.connectionManager - The connection manager to close idle connections forpublic void run()
run in class java.lang.Threadpublic void shutdown()
public void setConnectionTimeout(long connectionTimeout)
connectionTimeout - The connection timeout in millisecondsHttpConnectionManager.closeIdleConnections(long)public void setTimeoutInterval(long timeoutInterval)
timeoutInterval milliseconds.timeoutInterval - The timeout interval in millisecondsCopyright (c) 1999-2005 - Apache Software Foundation