public class JettyWebServer extends Object implements WebServer
WebServer
that can be used to control a Jetty web server.JettyReactiveWebServerFactory
Constructor and Description |
---|
JettyWebServer(org.eclipse.jetty.server.Server server)
Create a new
JettyWebServer instance. |
JettyWebServer(org.eclipse.jetty.server.Server server,
boolean autoStart)
Create a new
JettyWebServer instance. |
Modifier and Type | Method and Description |
---|---|
int |
getPort()
Return the port this server is listening on.
|
org.eclipse.jetty.server.Server |
getServer()
Returns access to the underlying Jetty Server.
|
void |
start()
Starts the web server.
|
void |
stop()
Stops the web server.
|
public JettyWebServer(org.eclipse.jetty.server.Server server)
JettyWebServer
instance.server
- the underlying Jetty serverpublic JettyWebServer(org.eclipse.jetty.server.Server server, boolean autoStart)
JettyWebServer
instance.server
- the underlying Jetty serverautoStart
- if auto-starting the serverpublic void start() throws WebServerException
WebServer
start
in interface WebServer
WebServerException
- if the server cannot be startedpublic void stop()
WebServer
public int getPort()
WebServer
public org.eclipse.jetty.server.Server getServer()
Copyright © 2020 Pivotal Software, Inc.. All rights reserved.