de.unkrig.commons.net.tool.httpd
Class Httpd

java.lang.Object
  extended by de.unkrig.commons.net.tool.httpd.Httpd
All Implemented Interfaces:
RunnableWhichThrows<java.io.IOException>, Stoppable

public class Httpd
extends java.lang.Object
implements RunnableWhichThrows<java.io.IOException>, Stoppable

A VERY simple HTTP server that serves contents from a "document root" directory.


Constructor Summary
Httpd(java.net.InetSocketAddress endpoint, java.lang.String fileName)
           
 
Method Summary
 java.net.InetSocketAddress getEndpointAddress()
           
 void run()
          "To run" an instance means to call this method and wait until it returns.
 void stop()
          Returns when this Stoppable has completely stopped.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Httpd

public Httpd(java.net.InetSocketAddress endpoint,
             java.lang.String fileName)
      throws java.io.IOException
Throws:
java.io.IOException
Method Detail

run

public void run()
         throws java.io.IOException
Description copied from interface: RunnableWhichThrows
"To run" an instance means to call this method and wait until it returns.

Specified by:
run in interface RunnableWhichThrows<java.io.IOException>
Throws:
java.io.IOException

stop

public void stop()
Description copied from interface: Stoppable
Returns when this Stoppable has completely stopped.

Specified by:
stop in interface Stoppable

getEndpointAddress

public java.net.InetSocketAddress getEndpointAddress()
See Also:
HttpServer.getEndpointAddress()