edu.sdsc.inca
Class Server.ClientDispatcher

java.lang.Object
  extended byjava.lang.Thread
      extended byedu.sdsc.inca.Server.ClientDispatcher
All Implemented Interfaces:
java.lang.Runnable
Enclosing class:
Server

protected class Server.ClientDispatcher
extends java.lang.Thread

A class that listens on a server socket and adds new client connections to a work queue.


Field Summary
protected  boolean shutdown
           
protected  java.net.ServerSocket ss
           
protected  WorkQueue wq
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
Server.ClientDispatcher(java.net.ServerSocket ss, WorkQueue 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, 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
 

Field Detail

shutdown

protected boolean shutdown

ss

protected java.net.ServerSocket ss

wq

protected WorkQueue wq
Constructor Detail

Server.ClientDispatcher

public Server.ClientDispatcher(java.net.ServerSocket ss,
                               WorkQueue wq)
Constructs a new ClientDispatcher.

Parameters:
ss - the server socket to listen to
wq - the work queue on which to place new client connections
Method Detail

isShutdown

public boolean isShutdown()
Returns true iff this thread has been interrupted and clean up is done.


run

public void run()
Begin listening to the server socket and queueing client connections.


setShutdown

protected void setShutdown(boolean shutdown)