public class JettyWebServer extends Object implements WebServer
WebServer
that can be used to control a Jetty web server.JettyReactiveWebServerFactory
Constructor and Description |
---|
JettyWebServer(Server server)
Create a new
JettyWebServer instance. |
JettyWebServer(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.
|
Server |
getServer()
Returns access to the underlying Jetty Server.
|
void |
start()
Starts the web server.
|
void |
stop()
Stops the web server.
|
public JettyWebServer(Server server)
JettyWebServer
instance.server
- the underlying Jetty serverpublic JettyWebServer(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 Server getServer()
Copyright © 2019 Pivotal Software, Inc.. All rights reserved.