Merge pull request #39916 from wanger26

* pr/39916:
  Polish "Add getUndertow method to UndertowWebServer"
  Add getUndertow method to UndertowWebServer

Closes gh-39916
This commit is contained in:
Moritz Halbritter 2024-03-13 11:27:51 +01:00
commit 9b4974f8d3
1 changed files with 10 additions and 0 deletions

View File

@ -298,6 +298,16 @@ public class UndertowWebServer implements WebServer {
return ports.get(0).getNumber(); return ports.get(0).getNumber();
} }
/**
* Returns the {@link Undertow Undertow server}. Returns {@code null} until the server
* has been started.
* @return the Undertow server or {@code null} if the server hasn't been started yet
* @since 3.3.0
*/
public Undertow getUndertow() {
return this.undertow;
}
@Override @Override
public void shutDownGracefully(GracefulShutdownCallback callback) { public void shutDownGracefully(GracefulShutdownCallback callback) {
if (this.gracefulShutdown == null) { if (this.gracefulShutdown == null) {