Interface HotReplacementContext


public interface HotReplacementContext
  • Method Details

    • getClassesDir

      List<Path> getClassesDir()
    • getSourcesDir

      List<Path> getSourcesDir()
    • getTestSourcesDir

      List<Path> getTestSourcesDir()
    • getResourcesDir

      List<Path> getResourcesDir()
    • 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 Exception
      Scans 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:
      true if a restart was performed, false otherwise
      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
    • addPostRestartStep

      void addPostRestartStep(Runnable runnable)
      Adds a task that is run after the restart is performed.