|
QuickServer v1.4.7 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjava.lang.Thread
org.quickserver.net.server.GhostSocketReaper
Class (Server Hook) that closes any dead (ghost) sockets that are no longer connected or communicating.
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.
| Field Summary |
| Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Fields inherited from interface org.quickserver.net.ServerHook |
POST_SHUTDOWN, POST_STARTUP, PRE_SHUTDOWN, PRE_STARTUP |
| Constructor Summary | |
GhostSocketReaper()
|
|
| Method Summary | |
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()
|
| 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 GhostSocketReaper()
| Method Detail |
public void initHook(QuickServer quickserver)
ServerHook
initHook in interface ServerHookquickserver - is the server to which hook belongs to.public boolean handleEvent(int event)
ServerHook
handleEvent in interface ServerHookServerHook.PRE_STARTUP,
ServerHook.POST_STARTUP,
ServerHook.PRE_SHUTDOWN,
ServerHook.POST_SHUTDOWNpublic java.lang.String info()
ServerHook
info in interface ServerHookpublic void run()
run in interface java.lang.Runnable
|
QuickServer v1.4.7 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||