org.placelab.proxy
Class HTTPServer

java.lang.Object
  extended byorg.placelab.proxy.SocketServer
      extended byorg.placelab.proxy.HTTPServer
All Implemented Interfaces:
java.lang.Runnable
Direct Known Subclasses:
ServletServer

public abstract class HTTPServer
extends SocketServer


Constructor Summary
HTTPServer(int port, int threadCount, java.lang.String label)
           
 
Method Summary
 byte[] getByteArray(java.io.InputStream in)
           
static java.util.Hashtable getHeaders(java.io.InputStream in)
           
abstract  HTTPResponse serviceRequest(HTTPRequest request)
           
 void serviceSocket(java.net.Socket s)
           
 
Methods inherited from class org.placelab.proxy.SocketServer
getNumberOfConnections, getPort, getStartTimeMillis, getWorker, run, startServer, stopServer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HTTPServer

public HTTPServer(int port,
                  int threadCount,
                  java.lang.String label)
Method Detail

serviceSocket

public void serviceSocket(java.net.Socket s)
Specified by:
serviceSocket in class SocketServer

getByteArray

public byte[] getByteArray(java.io.InputStream in)
                    throws java.io.IOException
Throws:
java.io.IOException

getHeaders

public static java.util.Hashtable getHeaders(java.io.InputStream in)
                                      throws java.io.IOException
Throws:
java.io.IOException

serviceRequest

public abstract HTTPResponse serviceRequest(HTTPRequest request)