org.springframework.boot.web.embedded.netty

Class NettyWebServer

  • All Implemented Interfaces:
    WebServer


    public class NettyWebServer
    extends Object
    implements WebServer
    WebServer that can be used to control a Reactor Netty web server. Usually this class should be created using the NettyReactiveWebServerFactory and not directly.
    Since:
    2.0.0
    Author:
    Brian Clozel, Madhura Bhave, Andy Wilkinson
    • Constructor Detail

      • NettyWebServer

        public NettyWebServer(reactor.ipc.netty.http.server.HttpServer httpServer,
                              org.springframework.http.server.reactive.ReactorHttpHandlerAdapter handlerAdapter,
                              Duration lifecycleTimeout)
    • Method Detail

      • stop

        public void stop()
                  throws WebServerException
        Description copied from interface: WebServer
        Stops the web server. Calling this method on an already stopped server has no effect.
        Specified by:
        stop in interface WebServer
        Throws:
        WebServerException - if the server cannot be stopped
      • getPort

        public int getPort()
        Description copied from interface: WebServer
        Return the port this server is listening on.
        Specified by:
        getPort in interface WebServer
        Returns:
        the port (or -1 if none)

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