Package io.quarkus.runtime.shutdown
Interface ShutdownListener
-
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 Modifier and Type Interface Description static interface
ShutdownListener.ShutdownNotification
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default void
preShutdown(ShutdownListener.ShutdownNotification notification)
Pre shutdown notification, the listener can use this to notify external systems this application is about to shut down.default void
shutdown(ShutdownListener.ShutdownNotification notification)
The shutdown notification.
-
-
-
Method Detail
-
preShutdown
default void preShutdown(ShutdownListener.ShutdownNotification notification)
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
default void shutdown(ShutdownListener.ShutdownNotification notification)
The shutdown notification. The listener should start rejecting requests and wait for all existing ones to finish.- Parameters:
notification
- The notification event
-
-