public class HttpServer
extends org.eclipse.jetty.server.Server
org.eclipse.jetty.server.handler.AbstractHandler.ErrorDispatchHandler
org.eclipse.jetty.util.component.AbstractLifeCycle.AbstractLifeCycleListener
Constructor and Description |
---|
HttpServer()
Instantiates a new HttpServer, using system properties.
|
HttpServer(HttpServerConfiguration configuration)
Instantiates a new HttpServer.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addHandler(org.eclipse.jetty.server.Handler handler)
Adds a handler to this http server
|
void |
addServerStartedListener(EventListener listener)
Adds a startup listener.
|
void |
addServerStoppedListener(EventListener listener)
Adds a shutdown listener.
|
void |
setHandler(org.eclipse.jetty.server.Handler handler) |
void |
startServer()
Starts this server.
|
void |
stopServer()
Stops this server.
|
addConnector, clearAttributes, doStart, doStop, dump, getAttribute, getAttributeNames, getConnectors, getDateField, getErrorHandler, getRequestLog, getSessionIdManager, getStopAtShutdown, getThreadPool, getURI, getVersion, handle, handleAsync, handleOptions, isDumpAfterStart, isDumpBeforeStop, join, main, removeAttribute, removeConnector, setAttribute, setConnectors, setDumpAfterStart, setDumpBeforeStop, setErrorHandler, setRequestLog, setSessionIdManager, setStopAtShutdown, setStopTimeout, start, toString
destroy, expandChildren, getHandler, getHandlers, handle, insertHandler
doShutdown, expandHandler, findContainerOf, getChildHandlerByClass, getChildHandlers, getChildHandlersByClass, setServer
addBean, addBean, addBean, addEventListener, addManaged, contains, dump, dump, dump, dump, dumpBeans, dumpObject, dumpObjects, dumpStdErr, dumpThis, getBean, getBeans, getBeans, getContainedBeans, getContainedBeans, isAuto, isManaged, isUnmanaged, manage, removeBean, removeBeans, removeEventListener, setBeans, stop, unmanage, updateBean, updateBean, updateBeans
addLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public HttpServer()
public HttpServer(HttpServerConfiguration configuration)
configuration
- the server configuration.public final void startServer() throws Exception
Exception
- in case of an exceptionpublic final void stopServer() throws Exception
Exception
- in case of an exceptionpublic final void addServerStartedListener(EventListener listener)
listener
- a listener notified when this server is started.public final void addServerStoppedListener(EventListener listener)
listener
- a listener notified when this server is stopped.public final void setHandler(org.eclipse.jetty.server.Handler handler)
setHandler
in class org.eclipse.jetty.server.handler.HandlerWrapper
protected final void addHandler(org.eclipse.jetty.server.Handler handler)
handler
- the handler to add