public class HttpServer
extends AbstractLifeCycle
Constructor and Description |
---|
HttpServer(XmlConfiguration configuration)
create server from configuration.
|
Modifier and Type | Method and Description |
---|---|
void |
addHttpHandler(HttpHandler smilaHandler)
add a SMILA http handler to this server.
|
void |
addJettyHandler(JettyHandler jettyHandler)
add a context with a jetty-handler to this server.
|
protected void |
doStart() |
protected void |
doStop() |
protected int |
getPort() |
protected int[] |
getPorts() |
void |
join()
wait for server to shutdown.
|
public HttpServer(XmlConfiguration configuration) throws java.lang.Exception
configuration
- jetty.xml configurationjava.lang.Exception
- error creating serverprotected int getPort()
protected int[] getPorts()
public void addHttpHandler(HttpHandler smilaHandler)
smilaHandler
- a SMILA http handler to install.public void addJettyHandler(JettyHandler jettyHandler)
jettyHandler
- a JettyHandler
to installpublic void join() throws java.lang.InterruptedException
java.lang.InterruptedException
- waiting was interrupted.protected void doStart()
AbstractLifeCycle#doStart()
protected void doStop()
AbstractLifeCycle#doStop()