Add getUndertow method to UndertowWebServer

getUndertow() to UndertowWebServer returns null until the server has
been started. Issue #3016 would enable getUndertow() to behave in a
similar way to getTomcat() on TomcatWebServer.

Signed-off-by: Jakob Wanger <jakobwanger@gmail.com>

See gh-39916
This commit is contained in:
Jakob Wanger
2024-03-12 19:53:57 -04:00
committed by Moritz Halbritter
parent 1a907bf47e
commit 7d30bc55d0

View File

@@ -298,6 +298,15 @@ public class UndertowWebServer implements WebServer {
return ports.get(0).getNumber();
}
/**
* Returns the undertow of the WebServer. Note, the return value will be null until
* the server has been started.
* @return undertow of the WebServer.
*/
public Undertow getUndertow() {
return this.undertow;
}
@Override
public void shutDownGracefully(GracefulShutdownCallback callback) {
if (this.gracefulShutdown == null) {