public class JettyHttpServer extends java.lang.Object implements Service
This is a wrapper around the Jetty Server. The handlers property must be used to configure the server to do anything useful. By default a simple welcome message is returned for all requests.
Common handlers to use are:
<oddjob id="this"> <job> <web:server id="server" xmlns:web="oddjob:web"/> </job> </oddjob>
Constructor and Description |
---|
JettyHttpServer() |
Modifier and Type | Method and Description |
---|---|
org.eclipse.jetty.server.Handler |
getHandlers(int index) |
java.lang.String |
getName() |
int |
getPort() |
void |
setHandlers(int index,
org.eclipse.jetty.server.Handler handler) |
void |
setName(java.lang.String name) |
void |
setPort(int port) |
void |
start() |
void |
stop()
Stop executing.
|
java.lang.String |
toString() |
public void start() throws java.lang.Exception
public void stop() throws FailedToStopException
Stoppable
stop
in interface Stoppable
FailedToStopException
public java.lang.String getName()
public void setName(java.lang.String name)
public int getPort()
public void setPort(int port)
public org.eclipse.jetty.server.Handler getHandlers(int index)
public void setHandlers(int index, org.eclipse.jetty.server.Handler handler)
public java.lang.String toString()
toString
in class java.lang.Object