org.springframework.boot.web.embedded.jetty

Class JettyReactiveWebServerFactory

    • Constructor Detail

      • JettyReactiveWebServerFactory

        public JettyReactiveWebServerFactory(int port)
        Create a new JettyServletWebServerFactory that listens for requests using the specified port.
        Parameters:
        port - the port to listen on
    • 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).
        Specified by:
        getWebServer in interface ReactiveWebServerFactory
        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 JettyServerCustomizer> customizers)
        Sets JettyServerCustomizers that will be applied to the Server before it is started. Calling this method will replace any existing customizers.
        Parameters:
        customizers - the Jetty customizers to apply
      • createJettyServer

        protected org.eclipse.jetty.server.Server createJettyServer(org.springframework.http.server.reactive.JettyHttpHandlerAdapter servlet)
      • getThreadPool

        public org.eclipse.jetty.util.thread.ThreadPool getThreadPool()
        Returns a Jetty ThreadPool that should be used by the Server.
        Returns:
        a Jetty ThreadPool or null
      • setThreadPool

        public void setThreadPool(org.eclipse.jetty.util.thread.ThreadPool threadPool)
        Set a Jetty ThreadPool that should be used by the Server. If set to null (default), the Server creates a ThreadPool implicitly.
        Parameters:
        threadPool - a Jetty ThreadPool to be used

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