Class CuratedApplicationShutdownBuildItem

java.lang.Object
io.quarkus.builder.item.BuildItem
io.quarkus.builder.item.SimpleBuildItem
io.quarkus.deployment.builditem.CuratedApplicationShutdownBuildItem

public final class CuratedApplicationShutdownBuildItem extends SimpleBuildItem
Build Item that can be used to queue shutdown tasks that are run when the CuratedApplication is closed.

For production applications, this will be at the end of the Maven/Gradle build. For dev mode applications, this will be when dev mode shuts down. For tests, it will generally be at the end of the test run. However, for continuous testing this will be when the outer dev mode process shuts down. For unit style tests, this will usually be the end of the test.

  • Field Details

    • registered

      boolean registered
  • Constructor Details

    • CuratedApplicationShutdownBuildItem

      public CuratedApplicationShutdownBuildItem(QuarkusClassLoader baseCl, boolean firstRun)
  • Method Details

    • addCloseTask

      public void addCloseTask(Runnable task, boolean firstRunOnly)
      Adds a task to run when the application is closed.
      Parameters:
      task - The task
      firstRunOnly - If this should only be added for the first augment step. This makes it possible to prevent tasks being added for every build.