Package io.quarkus.dev.spi
Interface HotReplacementContext
-
public interface HotReplacementContext
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddPreScanStep(Runnable runnable)Adds a task that is run before a live reload scan is performed.voidconsumeNoRestartChanges(Consumer<Set<String>> consumer)The consumer is invoked if only files which don't require restart are modified.booleandoScan(boolean userInitiated)Scans for changed source files, and restarts if detected.PathgetClassesDir()ThrowablegetDeploymentProblem()DevModeTypegetDevModeType()Returns the type of the development modeList<Path>getResourcesDir()List<Path>getSourcesDir()List<Path>getTestSourcesDir()booleanisTest()If this is true then this is a dev mode test case, rather than a user actually using Quarkus.voidsetRemoteProblem(Throwable throwable)Set<String>syncState(Map<String,String> fileHashes)This method returns a list of changed files compared to the provided map of file names to hashes.voidupdateFile(String file, byte[] data)
-
-
-
Method Detail
-
getClassesDir
Path getClassesDir()
-
getDeploymentProblem
Throwable getDeploymentProblem()
-
setRemoteProblem
void setRemoteProblem(Throwable throwable)
-
updateFile
void updateFile(String file, byte[] data)
-
isTest
boolean isTest()
If this is true then this is a dev mode test case, rather than a user actually using Quarkus.
-
getDevModeType
DevModeType getDevModeType()
Returns the type of the development mode- Returns:
- the dev mode type
-
doScan
boolean doScan(boolean userInitiated) throws ExceptionScans for changed source files, and restarts if detected.- Parameters:
userInitiated- If this scan was initiated by a user action (e.g. refreshing a browser)- Returns:
trueif a restart was performed,falseotherwise- Throws:
Exception
-
addPreScanStep
void addPreScanStep(Runnable runnable)
Adds a task that is run before a live reload scan is performed.- Parameters:
runnable- The task to run
-
consumeNoRestartChanges
void consumeNoRestartChanges(Consumer<Set<String>> consumer)
The consumer is invoked if only files which don't require restart are modified.- Parameters:
consumer- The input is a set of changed file paths- See Also:
io.quarkus.deployment.builditem.HotDeploymentWatchedFileBuildItem#isRestartNeeded()
-
syncState
Set<String> syncState(Map<String,String> fileHashes)
This method returns a list of changed files compared to the provided map of file names to hashes. This is needed for remote dev mode, it is unlikely to be useful for anything else- Parameters:
fileHashes- The file hashes- Returns:
- A set of changed files
-
-