org.jcoderz.commons.connector.http.transport
Class Terminator

java.lang.Object
  extended by java.lang.Thread
      extended by org.jcoderz.commons.connector.http.transport.Terminator
All Implemented Interfaces:
Runnable

public class Terminator
extends Thread

Class for stopping the server.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
Terminator(SimpleServer server)
          Constructor.
 
Method Summary
 void run()
          Starting terminator thread.
 int waitForQuit()
          Waits for the user to enter Q or q (followed by a return).
 
Methods inherited from class java.lang.Thread
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, yield
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Terminator

public Terminator(SimpleServer server)
Constructor.

Parameters:
server - the server to stop
Method Detail

run

public void run()
Starting terminator thread.

Specified by:
run in interface Runnable
Overrides:
run in class Thread

waitForQuit

public int waitForQuit()
Waits for the user to enter Q or q (followed by a return).

Returns:
int the exit status (nonzero indicates abnormal termination)


Copyright 2007 The jCoderZ Project.