org.springframework.boot.web.embedded.netty

Class NettyReactiveWebServerFactory

    • Constructor Detail

      • NettyReactiveWebServerFactory

        public NettyReactiveWebServerFactory()
      • NettyReactiveWebServerFactory

        public NettyReactiveWebServerFactory(int port)
    • Method Detail

      • getWebServer

        public WebServer getWebServer(HttpHandler httpHandler)
        Description copied from interface: ReactiveWebServerFactory
        Gets a new fully configured but paused WebServer instance. Clients should not be able to connect to the returned server until WebServer.start() is called (which happens when the ApplicationContext has been fully refreshed).
        Parameters:
        httpHandler - the HTTP handler in charge of processing requests
        Returns:
        a fully configured and started WebServer
        See Also:
        WebServer.stop()
      • setServerCustomizers

        public void setServerCustomizers(Collection<? extends NettyServerCustomizer> serverCustomizers)
        Set NettyServerCustomizers that should be applied to the Netty server builder. Calling this method will replace any existing customizers.
        Parameters:
        serverCustomizers - the customizers to set
      • addServerCustomizers

        public void addServerCustomizers(NettyServerCustomizer... serverCustomizers)
        Add NettyServerCustomizers that should applied while building the server.
        Parameters:
        serverCustomizers - the customizers to add
      • setLifecycleTimeout

        public void setLifecycleTimeout(Duration lifecycleTimeout)
        Set the maximum amount of time that should be waited when starting or stopping the server.
        Parameters:
        lifecycleTimeout - the lifecycle timeout