org.springframework.boot.web.embedded.tomcat

Class TomcatWebServer

    • Constructor Detail

      • TomcatWebServer

        public TomcatWebServer(org.apache.catalina.startup.Tomcat tomcat)
        Create a new TomcatWebServer instance.
        Parameters:
        tomcat - the underlying Tomcat server
      • TomcatWebServer

        public TomcatWebServer(org.apache.catalina.startup.Tomcat tomcat,
                               boolean autoStart)
        Create a new TomcatWebServer instance.
        Parameters:
        tomcat - the underlying Tomcat server
        autoStart - if the server should be started
    • 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)
      • getTomcat

        public org.apache.catalina.startup.Tomcat getTomcat()
        Returns access to the underlying Tomcat server.
        Returns:
        the Tomcat server

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