NettyWebServer

WebServer that can be used to control a Reactor Netty web server. Usually this class should be created using the NettyReactiveWebServerFactory and not directly.

Author

Brian Clozel

Madhura Bhave

Andy Wilkinson

Since

2.0.0

Constructors

Link copied to clipboard
constructor(httpServer: HttpServer, handlerAdapter: ReactorHttpHandlerAdapter, lifecycleTimeout: Duration, shutdown: Shutdown, resourceFactory: ReactorResourceFactory)
Creates a new NettyWebServer instance.

Functions

Link copied to clipboard
open fun destroy()
Destroys the web server such that it cannot be started again.
Link copied to clipboard
open fun getPort(): Int
Return the port this server is listening on.
Link copied to clipboard
open fun setRouteProviders(routeProviders: List<NettyRouteProvider>)
Link copied to clipboard
Initiates a graceful shutdown of the Netty web server.
Link copied to clipboard
open fun start()
Starts the web server.
Link copied to clipboard
open fun stop()
Stops the web server.