|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Thread edu.sdsc.inca.Server.ClientDispatcher
protected class Server.ClientDispatcher
A class that listens on a server socket and adds new client connections to a work queue.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
Field Summary | |
---|---|
protected boolean |
shutdown
|
protected java.net.ServerSocket |
ss
|
protected WorkQueue<Worker> |
wq
|
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
Server.ClientDispatcher(java.net.ServerSocket ss,
WorkQueue<Worker> wq)
Constructs a new ClientDispatcher. |
Method Summary | |
---|---|
boolean |
isShutdown()
Returns true iff this thread has been interrupted and clean up is done. |
void |
run()
Begin listening to the server socket and queueing client connections. |
protected void |
setShutdown(boolean shutdown)
|
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 |
---|
protected boolean shutdown
protected java.net.ServerSocket ss
protected WorkQueue<Worker> wq
Constructor Detail |
---|
public Server.ClientDispatcher(java.net.ServerSocket ss, WorkQueue<Worker> wq)
ss
- the server socket to listen towq
- the work queue on which to place new client connectionsMethod Detail |
---|
public boolean isShutdown()
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
protected void setShutdown(boolean shutdown)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |