xsul.http_server
Class HttpMiniServer

java.lang.Object
  extended byxsul.http_server.HttpMiniServer

public class HttpMiniServer
extends java.lang.Object

Very simple embeddable web server that is hosting web services.

Version:
$Revision: 1.8 $
Author:
Aleksander Slominski

Constructor Summary
HttpMiniServer()
          Creates mini server listening on default port for transport (ex.
HttpMiniServer(int port)
          Creates mini server listening on given port
Note: 0 means to use first available port (provided by operating system)
Note: -1 means to use default port for given transport (ex.
HttpMiniServer(ServerSocketFactory serverSocketFactory)
           
 
Method Summary
 java.lang.String getLocation()
           
 int getServerPort()
           
 boolean isSuppressedSendingStackTraces()
           
static HttpMiniServer newInstance(ServerSocketFactory socketFactory)
           
 void shutdownServer()
           
 void startServer()
           
 void stopServer()
           
 void suppressSendingStackTraces(boolean suppressSendingStackTraces)
           
 void useServlet(HttpMiniServlet servlet)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpMiniServer

public HttpMiniServer()
               throws HttpServerException
Creates mini server listening on default port for transport (ex. 80 for HTTP).
Note: only one server can be started to listen on one port.


HttpMiniServer

public HttpMiniServer(int port)
               throws HttpServerException
Creates mini server listening on given port
Note: 0 means to use first available port (provided by operating system)
Note: -1 means to use default port for given transport (ex. 80 for HTTP)


HttpMiniServer

public HttpMiniServer(ServerSocketFactory serverSocketFactory)
               throws HttpServerException
Method Detail

suppressSendingStackTraces

public void suppressSendingStackTraces(boolean suppressSendingStackTraces)

isSuppressedSendingStackTraces

public boolean isSuppressedSendingStackTraces()

newInstance

public static HttpMiniServer newInstance(ServerSocketFactory socketFactory)

getServerPort

public int getServerPort()

getLocation

public java.lang.String getLocation()
                             throws HttpServerException
Throws:
HttpServerException

useServlet

public void useServlet(HttpMiniServlet servlet)

startServer

public void startServer()
                 throws HttpServerException
Throws:
HttpServerException

stopServer

public void stopServer()
                throws HttpServerException
Throws:
HttpServerException

shutdownServer

public void shutdownServer()
                    throws HttpServerException
Throws:
HttpServerException


IU Extreme! Lab (http://www.extreme.indiana.edu)