net.sf.zekr.engine.server
Class DefaultHttpServer
java.lang.Object
net.sf.zekr.engine.server.HttpServer
net.sf.zekr.engine.server.DefaultHttpServer
- All Implemented Interfaces:
- java.lang.Runnable
public class DefaultHttpServer
- extends HttpServer
This class intends to implement a simple HTTP server based on NanoHTTPD. It loops infinitely until it is
interrupted.
- Author:
- Mohsen Saboorian
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CACHED_RESOURCE
public static final java.lang.String CACHED_RESOURCE
- See Also:
- Constant Field Values
WORKSPACE_RESOURCE
public static final java.lang.String WORKSPACE_RESOURCE
- See Also:
- Constant Field Values
BASE_RESOURCE
public static final java.lang.String BASE_RESOURCE
- See Also:
- Constant Field Values
WORKSPACE_OR_BASE_RESOURCE
public static final java.lang.String WORKSPACE_OR_BASE_RESOURCE
- See Also:
- Constant Field Values
run
public void run()
getAddress
public java.lang.String getAddress()
throws HttpServerRuntimeException
- Specified by:
getAddress
in class HttpServer
- Returns:
- HTTP server address. Examples are "192.168.0.1" and "127.0.0.1".
- Throws:
HttpServerRuntimeException
getPort
public int getPort()
- Specified by:
getPort
in class HttpServer
- Returns:
- port on which HTTP server is listening for input connections.