java.lang.Object
java.lang.Thread
edu.stanford.genetics.treeview.app.Daemon
- All Implemented Interfaces:
- java.lang.Runnable
- public class Daemon
- extends java.lang.Thread
A daemon is a thread that waits for request and forward to a RequestHandler
in this case, the TreeViewApp
The intention of this :
If an instance of the program is running, it shall starts a daemon
which waits for requests.
When another instance of the program is started, the new program will
first try to contact the daemons. If any exists, the new program will
ask the daemon to do the task.
daemon will delegate the task to the RequestHandler.
Nested classes inherited from class java.lang.Thread |
java.lang.Thread.UncaughtExceptionHandler |
Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, 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 |
DAEMON_RUNNING
public static java.lang.String DAEMON_RUNNING
BASE_PORT
public static int BASE_PORT
NUM_OF_PORTS
public static int NUM_OF_PORTS
REQUST_TIME_OUT
public static int REQUST_TIME_OUT
serverSocket
private java.net.ServerSocket serverSocket
handler
private Daemon.RequestHandler handler
DEBUG
public static boolean DEBUG
Daemon
public Daemon(Daemon.RequestHandler handler)
throws java.io.IOException
initSocket
private boolean initSocket()
run
public void run()
- Description copied from class:
java.lang.Thread
- The method of Thread that will be run if there is no Runnable object
associated with the Thread. Thread's implementation does nothing at all.
toString
public static java.lang.String toString(java.lang.String[] args)