|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
org.apache.commons.httpclient.util.IdleConnectionTimeoutThread
A utility class for periodically closing idle connections.
HttpConnectionManager.closeIdleConnections(long)
Field Summary |
Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
IdleConnectionTimeoutThread()
|
Method Summary | |
void |
addConnectionManager(HttpConnectionManager connectionManager)
Adds a connection manager to be handled by this class. |
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. |
Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public IdleConnectionTimeoutThread()
Method Detail |
public 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 removepublic void run()
public 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 milliseconds
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |