org.springframework.boot.web.server

Class AbstractConfigurableWebServerFactory

  • java.lang.Object
    • org.springframework.boot.web.server.AbstractConfigurableWebServerFactory
    • Constructor Detail

      • AbstractConfigurableWebServerFactory

        public AbstractConfigurableWebServerFactory(int port)
        Create a new AbstractConfigurableWebServerFactory instance with the specified port.
        Parameters:
        port - the port number for the web server
    • Method Detail

      • getPort

        public int getPort()
        The port that the web server listens on.
        Returns:
        the port
      • setPort

        public void setPort(int port)
        Description copied from interface: ConfigurableWebServerFactory
        Sets the port that the web server should listen on. If not specified port '8080' will be used. Use port -1 to disable auto-start (i.e. start the web application context but not have it listen to any port).
        Specified by:
        setPort in interface ConfigurableWebServerFactory
        Parameters:
        port - the port to set
      • getAddress

        public java.net.InetAddress getAddress()
        Return the address that the web server binds to.
        Returns:
        the address
      • getErrorPages

        public java.util.Set<ErrorPage> getErrorPages()
        Returns a mutable set of ErrorPages that will be used when handling exceptions.
        Returns:
        the error pages
      • addErrorPages

        public void addErrorPages(ErrorPage... errorPages)
        Description copied from interface: ErrorPageRegistry
        Adds error pages that will be used when handling exceptions.
        Specified by:
        addErrorPages in interface ErrorPageRegistry
        Parameters:
        errorPages - the error pages
      • getSsl

        public Ssl getSsl()
      • getHttp2

        public Http2 getHttp2()
      • getServerHeader

        public java.lang.String getServerHeader()
      • getShutdown

        public Shutdown getShutdown()
        Returns the shutdown configuration that will be applied to the server.
        Returns:
        the shutdown configuration
        Since:
        2.3.0
      • createTempDir

        protected final java.io.File createTempDir(java.lang.String prefix)
        Return the absolute temp dir for given web server.
        Parameters:
        prefix - server name
        Returns:
        the temp dir for given server.