Package io.quarkus.runtime.shutdown
Interface ShutdownListener
- All Known Implementing Classes:
LoggingSetupRecorder.ShutdownNotifier
public interface ShutdownListener
A listener that can be registered to control the shutdown process and implement
graceful shutdown.
Shutdown happens in two phases. In the pre shutdown phase the application should
function normally, but should notify external systems that it is about to go away.
In the shutdown phase the app should disallow new external requests, however
allow existing requests to complete normally.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptiondefault voidpreShutdown(ShutdownListener.ShutdownNotification notification) Pre shutdown notification, the listener can use this to notify external systems this application is about to shut down.default voidshutdown(ShutdownListener.ShutdownNotification notification) The shutdown notification.
-
Method Details
-
preShutdown
Pre shutdown notification, the listener can use this to notify external systems this application is about to shut down.- Parameters:
notification- The notification event
-
shutdown
The shutdown notification. The listener should start rejecting requests and wait for all existing ones to finish.- Parameters:
notification- The notification event
-