org.springframework.boot.web.embedded.netty

Class NettyReactiveWebServerFactory

    • Constructor Detail

      • NettyReactiveWebServerFactory

        public NettyReactiveWebServerFactory()
      • NettyReactiveWebServerFactory

        public NettyReactiveWebServerFactory(int port)
    • Method Detail

      • getWebServer

        public WebServer getWebServer(org.springframework.http.server.reactive.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
      • setUseForwardHeaders

        public void setUseForwardHeaders(boolean useForwardHeaders)
        Set if x-forward-* headers should be processed.
        Parameters:
        useForwardHeaders - if x-forward headers should be used
        Since:
        2.1.0
      • setResourceFactory

        public void setResourceFactory(org.springframework.http.client.reactive.ReactorResourceFactory resourceFactory)
        Set the ReactorResourceFactory to get the shared resources from.
        Parameters:
        resourceFactory - the server resources
        Since:
        2.1.0

Copyright © 2020 Pivotal Software, Inc.. All rights reserved.