org.nnsoft.shs.core
Class SimpleHttpServer

java.lang.Object
  extended by org.nnsoft.shs.core.SimpleHttpServer
All Implemented Interfaces:
HttpServer

public final class SimpleHttpServer
extends Object
implements HttpServer

A simple HttpServer implementation. This class must NOT be shared across threads, consider it be used inside main(String...) method.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.nnsoft.shs.HttpServer
HttpServer.Status
 
Constructor Summary
SimpleHttpServer()
           
 
Method Summary
 HttpServer.Status getStatus()
          Returns the current server status.
 void init(HttpServerConfiguration configuratoruration)
          Initializes the current server.
 void start()
          Starts the current server instance.
 void stop()
          Stops the current server execution.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleHttpServer

public SimpleHttpServer()
Method Detail

init

public void init(HttpServerConfiguration configuratoruration)
          throws InitException
Initializes the current server.

Specified by:
init in interface HttpServer
Throws:
InitException - if any error occurs while starting up.

start

public void start()
           throws RunException
Starts the current server instance.

Specified by:
start in interface HttpServer
Throws:
RunException - if any fatal error occurs while running.

stop

public void stop()
          throws ShutdownException
Stops the current server execution.

Specified by:
stop in interface HttpServer
Throws:
ShutdownException - if any error occurs while shutting down.

getStatus

public HttpServer.Status getStatus()
Returns the current server status.

Specified by:
getStatus in interface HttpServer
Returns:
the current server status.


Copyright © 2012 99 Software Foundation. All Rights Reserved.