Skip to content

Commit 9b4974f

Browse files
committed
Merge pull request #39916 from wanger26
* pr/39916: Polish "Add getUndertow method to UndertowWebServer" Add getUndertow method to UndertowWebServer Closes gh-39916
2 parents 1a907bf + c2be815 commit 9b4974f

File tree

1 file changed

+10
-0
lines changed
  • spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/undertow

1 file changed

+10
-0
lines changed

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/undertow/UndertowWebServer.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,16 @@ public int getPort() {
298298
return ports.get(0).getNumber();
299299
}
300300

301+
/**
302+
* Returns the {@link Undertow Undertow server}. Returns {@code null} until the server
303+
* has been started.
304+
* @return the Undertow server or {@code null} if the server hasn't been started yet
305+
* @since 3.3.0
306+
*/
307+
public Undertow getUndertow() {
308+
return this.undertow;
309+
}
310+
301311
@Override
302312
public void shutDownGracefully(GracefulShutdownCallback callback) {
303313
if (this.gracefulShutdown == null) {

0 commit comments

Comments
 (0)