Class HttpdMulti

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--HttpdMulti

public class HttpdMulti
extends java.lang.Thread

A multi-threaded proxy server. It allows multiple "simultaneous" clients to connect.


Field Summary
 java.sql.Connection Conn
          the connection to the database
static int DEFAULT_PORT
          the default port to run the server
 boolean fContinueListening
          listening action flag
 boolean fDebugOn
          verbose flag
protected  java.net.ServerSocket fMainListenSocket
          the main server socket
protected  int fPort
          the actual port to run the server
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
HttpdMulti(int port)
          initialize the server
 
Method Summary
 void run()
          This method waits for an incoming connection, opens input and output streams on that connection, then uses HttpTransactionHandler to complete the request.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, 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

DEFAULT_PORT

public static final int DEFAULT_PORT
the default port to run the server

fDebugOn

public boolean fDebugOn
verbose flag

fPort

protected int fPort
the actual port to run the server

fMainListenSocket

protected java.net.ServerSocket fMainListenSocket
the main server socket

fContinueListening

public boolean fContinueListening
listening action flag

Conn

public java.sql.Connection Conn
the connection to the database
Constructor Detail

HttpdMulti

public HttpdMulti(int port)
           throws java.lang.Exception
initialize the server
Parameters:
port - the port on which the server will run
Throws:
java.lang.Exception - if anything is wrong
Method Detail

run

public void run()
This method waits for an incoming connection, opens input and output streams on that connection, then uses HttpTransactionHandler to complete the request. Once the request has been completed, shuts down the connection and begins waiting for a new connection.
Overrides:
run in class java.lang.Thread