|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Thread com.Prominic.jFTPd.IdleKiller
public class IdleKiller
This class is used to kill idle connections - that is connections that didn't send any command in the specified period and which don't do any transfers - are not busy. Connections are checked every 15 seconds.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
Field Summary | |
---|---|
(package private) boolean |
DEBUG
|
(package private) ConnectionHandler |
handler
|
(package private) boolean |
running
|
(package private) long |
sleepTime
|
(package private) long |
timeout
|
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
IdleKiller(ConnectionHandler handler,
long timeout)
Creates an idle killer. |
Method Summary | |
---|---|
long |
getTimeout()
|
void |
run()
Runs the thread. |
void |
setTimeout(long t)
Sets the timeout value. |
void |
shutdownConnections()
This terminates all the active connections, no matter if they are idle or not. |
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, 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 |
Field Detail |
---|
boolean DEBUG
ConnectionHandler handler
long timeout
long sleepTime
boolean running
Constructor Detail |
---|
public IdleKiller(ConnectionHandler handler, long timeout)
handler
- - connection handlertimeout
- - the timeout periodMethod Detail |
---|
public long getTimeout()
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
public void setTimeout(long t)
t
- - new timeout value.public void shutdownConnections()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |