uk.ac.lancs.relate.gateways.services.config.classServer
Class HTTPServer

java.lang.Object
  extended by uk.ac.lancs.relate.gateways.services.config.classServer.HTTPServer
All Implemented Interfaces:
java.lang.Runnable
Direct Known Subclasses:
ClassServer

public class HTTPServer
extends java.lang.Object
implements java.lang.Runnable

This class creates a simple multithreaded web server. Sources: http://java.sun.com/developer/technicalArticles/Networking/Webserver/

Author:
Dominique Guinard
Personal Homepage

Field Summary
protected static java.util.Properties props
           
 
Constructor Summary
HTTPServer(int port, java.net.InetAddress bindingAddress)
           
 
Method Summary
protected static void loadProps()
          load www-server.properties from java.home
protected  void log(java.lang.String s)
          Print to the log file
protected static void p(java.lang.String s)
          Print to stdout
protected static void printProps()
          Prints the properties
 void run()
          Starts the webserver's request/response loop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

props

protected static java.util.Properties props
Constructor Detail

HTTPServer

public HTTPServer(int port,
                  java.net.InetAddress bindingAddress)
Method Detail

run

public void run()
Starts the webserver's request/response loop

Specified by:
run in interface java.lang.Runnable

p

protected static void p(java.lang.String s)
Print to stdout


log

protected void log(java.lang.String s)
Print to the log file


loadProps

protected static void loadProps()
                         throws java.io.IOException
load www-server.properties from java.home

Throws:
java.io.IOException

printProps

protected static void printProps()
Prints the properties