de.unkrig.commons.net.http
Class NioHttpServer

java.lang.Object
  extended by de.unkrig.commons.net.http.NioHttpServer
All Implemented Interfaces:
Stoppable

public final class NioHttpServer
extends java.lang.Object
implements Stoppable

Implementation of an HTTP server.

See Also:
NioHttpServer(InetSocketAddress, HttpClientConnectionHandler)

Constructor Summary
NioHttpServer(java.net.InetSocketAddress endpoint, HttpClientConnectionHandler httpClientConnectionHandler)
          Accepts connections on the endpoint; obtains a new Servlett from the httpClientConnectionHandlerFactory for each accepted connection, and then calls Servlett.handleRequest(HttpRequest) for each received request.
 
Method Summary
 void start(int threadCount)
           
 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

NioHttpServer

public NioHttpServer(java.net.InetSocketAddress endpoint,
                     HttpClientConnectionHandler httpClientConnectionHandler)
              throws java.io.IOException
Accepts connections on the endpoint; obtains a new Servlett from the httpClientConnectionHandlerFactory for each accepted connection, and then calls Servlett.handleRequest(HttpRequest) for each received request.

Throws:
java.io.IOException
Method Detail

start

public void start(int threadCount)
See Also:
NioTcpServer.start(int)

stop

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

Specified by:
stop in interface Stoppable