public abstract class AbstractHTTPD
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
_ip |
protected int |
_port |
protected org.eclipse.jetty.server.Server |
_server |
Modifier | Constructor and Description |
---|---|
protected |
AbstractHTTPD(H2O.BaseArgs args) |
Modifier and Type | Method and Description |
---|---|
protected void |
createServer(org.eclipse.jetty.server.Connector connector) |
protected abstract java.lang.RuntimeException |
failEx(java.lang.String message) |
java.lang.String |
getIp() |
int |
getPort() |
java.lang.String |
getScheme() |
org.eclipse.jetty.server.Server |
getServer() |
void |
registerHandlers(org.eclipse.jetty.server.handler.HandlerWrapper handlerWrapper)
Hook up Jetty handlers.
|
protected abstract void |
registerHandlers(org.eclipse.jetty.server.handler.HandlerWrapper handlerWrapper,
org.eclipse.jetty.servlet.ServletContextHandler context) |
void |
setServer(org.eclipse.jetty.server.Server value) |
void |
setup(java.lang.String ip,
int port) |
void |
start(java.lang.String ip,
int port)
Choose a Port and IP address and start the Jetty server.
|
protected void |
startHttp() |
void |
stop()
Stop Jetty server after it has been started.
|
protected java.lang.String _ip
protected int _port
protected org.eclipse.jetty.server.Server _server
protected AbstractHTTPD(H2O.BaseArgs args)
public java.lang.String getScheme()
public int getPort()
public java.lang.String getIp()
public org.eclipse.jetty.server.Server getServer()
public void setServer(org.eclipse.jetty.server.Server value)
public void setup(java.lang.String ip, int port)
public void start(java.lang.String ip, int port) throws java.lang.Exception
java.lang.Exception
protected void createServer(org.eclipse.jetty.server.Connector connector) throws java.lang.Exception
java.lang.Exception
protected abstract java.lang.RuntimeException failEx(java.lang.String message)
protected void startHttp() throws java.lang.Exception
java.lang.Exception
public void stop() throws java.lang.Exception
java.lang.Exception
public void registerHandlers(org.eclipse.jetty.server.handler.HandlerWrapper handlerWrapper)
protected abstract void registerHandlers(org.eclipse.jetty.server.handler.HandlerWrapper handlerWrapper, org.eclipse.jetty.servlet.ServletContextHandler context)