public class GhostSocketReaper extends java.lang.Thread implements ServerHook
It runs as a daemon thread. This thread will simply return if the socket timeout is set to <= 0 in QuickServer. It will close any socket that has not sent in any communication for more than the socket timeout set, i.e., if socket timeout is set to 1000 miliseconds then if a client socket has not communicated for more than 1 seconds then this thread will close the socket and returns the ClientHandler to the pool.
POST_SHUTDOWN, POST_STARTUP, PRE_SHUTDOWN, PRE_STARTUP| Constructor and Description |
|---|
GhostSocketReaper() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
handleEvent(int event)
Invoked pre/post server event.
|
java.lang.String |
info()
Information about the server hook.
|
void |
initHook(QuickServer quickserver)
Method called to perform any initialisation
|
void |
run() |
activeCount, 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, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yieldpublic void initHook(QuickServer quickserver)
ServerHookinitHook in interface ServerHookquickserver - is the server to which hook belongs to.public boolean handleEvent(int event)
ServerHookhandleEvent in interface ServerHookServerHook.PRE_STARTUP,
ServerHook.POST_STARTUP,
ServerHook.PRE_SHUTDOWN,
ServerHook.POST_SHUTDOWNpublic java.lang.String info()
ServerHookinfo in interface ServerHookpublic void run()
run in interface java.lang.Runnablerun in class java.lang.ThreadCopyright © 2003-2014 QuickServer.org