org.springframework.boot.devtools.restart.server

Class RestartServer

  • java.lang.Object
    • org.springframework.boot.devtools.restart.server.RestartServer


  • public class RestartServer
    extends Object
    Server used to restart the current application with updated ClassLoaderFiles.
    Since:
    1.3.0
    Author:
    Phillip Webb
    • Constructor Detail

      • RestartServer

        public RestartServer(SourceFolderUrlFilter sourceFolderUrlFilter)
        Create a new RestartServer instance.
        Parameters:
        sourceFolderUrlFilter - the source filter used to link remote folder to the local classpath
      • RestartServer

        public RestartServer(SourceFolderUrlFilter sourceFolderUrlFilter,
                             ClassLoader classLoader)
        Create a new RestartServer instance.
        Parameters:
        sourceFolderUrlFilter - the source filter used to link remote folder to the local classpath
        classLoader - the application classloader
    • Method Detail

      • updateAndRestart

        public void updateAndRestart(ClassLoaderFiles files)
        Update the current running application with the specified ClassLoaderFiles and trigger a reload.
        Parameters:
        files - updated class loader files
      • restart

        protected void restart(Set<URL> urls,
                               ClassLoaderFiles files)
        Called to restart the application.
        Parameters:
        urls - the updated URLs
        files - the updated files