|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Thread
org.tranche.httpd.Httpd
public class Httpd
The httpd thread configures the server socket and the queue and waits for connections. Upon reception it adds the connecting socket to a queue where it will be serviced by and AbstractHttpHandler object.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
| Field Summary | |
|---|---|
static boolean |
DEBUG
Debug flag reserved for midium level of stdout vebrocity. |
static boolean |
DEBUG_VERBOSE
Debug flag reserver for a higher level of stdout vebrocity. |
static boolean |
ECHO
Flag for debugging an input stream. |
static int |
READ_AHEAD
Size to be used in marking an input stream. |
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
Httpd(int port,
int backLog,
int queueLength,
int minNumThreads,
int maxNumThreads)
Constructor |
|
| Method Summary | |
|---|---|
void |
finilize()
If this object is destroyed shutdowns and connections that are still open. |
int |
getPort()
Getter method for the port attribute. |
void |
run()
Implementation of the run method of the Thread. |
void |
setTimeout(int timeout)
Setter for the timeout of any open connections |
boolean |
startServer()
All the work for starting up the server is done here. |
void |
stopServer()
Method for stopping the server. |
| 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 |
|---|
public static final boolean DEBUG
public static final boolean DEBUG_VERBOSE
public static final boolean ECHO
public static final int READ_AHEAD
| Constructor Detail |
|---|
public Httpd(int port,
int backLog,
int queueLength,
int minNumThreads,
int maxNumThreads)
port - The port to setup the server socketbackLog - The size of connection to be managed by the server socket itselfqueueLength - The max size of the QueueminNumThreads - The min number of SocketHandling threads activemaxNumThreads - The max number of SocketHandling threads active| Method Detail |
|---|
public void finilize()
public void setTimeout(int timeout)
timeout - public boolean startServer()
public void run()
run in interface java.lang.Runnablerun in class java.lang.Threadpublic void stopServer()
public int getPort()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||