Package io.quarkus.deployment.builditem
Class CuratedApplicationShutdownBuildItem
java.lang.Object
io.quarkus.builder.item.BuildItem
io.quarkus.builder.item.SimpleBuildItem
io.quarkus.deployment.builditem.CuratedApplicationShutdownBuildItem
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 Summary
-
Constructor Summary
ConstructorDescriptionCuratedApplicationShutdownBuildItem
(QuarkusClassLoader baseCl, boolean firstRun) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addCloseTask
(Runnable task, boolean firstRunOnly) Adds a task to run when the application is closed.
-
Field Details
-
registered
boolean registered
-
-
Constructor Details
-
CuratedApplicationShutdownBuildItem
-
-
Method Details
-
addCloseTask
Adds a task to run when the application is closed.- Parameters:
task
- The taskfirstRunOnly
- If this should only be added for the first augment step. This makes it possible to prevent tasks being added for every build.
-