Class RestartServer
- java.lang.Object
- org.springframework.boot.devtools.restart.server.RestartServer
public class RestartServer extends Object
Server used torestartthe current application with updatedClassLoaderFiles.- Since:
- 1.3.0
Constructor Summary
Constructors Constructor Description RestartServer(SourceFolderUrlFilter sourceFolderUrlFilter)Create a newRestartServerinstance.RestartServer(SourceFolderUrlFilter sourceFolderUrlFilter, ClassLoader classLoader)Create a newRestartServerinstance.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidrestart(Set<URL> urls, ClassLoaderFiles files)Called to restart the application.voidupdateAndRestart(ClassLoaderFiles files)Update the current running application with the specifiedClassLoaderFilesand trigger a reload.
Constructor Detail
RestartServer
public RestartServer(SourceFolderUrlFilter sourceFolderUrlFilter)
Create a newRestartServerinstance.- Parameters:
sourceFolderUrlFilter- the source filter used to link remote folder to the local classpath
RestartServer
public RestartServer(SourceFolderUrlFilter sourceFolderUrlFilter, ClassLoader classLoader)
Create a newRestartServerinstance.- Parameters:
sourceFolderUrlFilter- the source filter used to link remote folder to the local classpathclassLoader- the application classloader
Method Detail
updateAndRestart
public void updateAndRestart(ClassLoaderFiles files)
Update the current running application with the specifiedClassLoaderFilesand 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 URLsfiles- the updated files