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 Details

    • RestartServer

      public RestartServer(SourceDirectoryUrlFilter sourceDirectoryUrlFilter)
      Create a new RestartServer instance.
      Parameters:
      sourceDirectoryUrlFilter - the source filter used to link remote directory to the local classpath
    • RestartServer

      public RestartServer(SourceDirectoryUrlFilter sourceDirectoryUrlFilter, ClassLoader classLoader)
      Create a new RestartServer instance.
      Parameters:
      sourceDirectoryUrlFilter - the source filter used to link remote directory to the local classpath
      classLoader - the application classloader
  • Method Details

    • 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