Class 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 Detail

      • registered

        boolean registered
    • Constructor Detail

      • CuratedApplicationShutdownBuildItem

        public CuratedApplicationShutdownBuildItem​(QuarkusClassLoader baseCl,
                                                   boolean firstRun)
    • Method Detail

      • 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