Class GracefulShutdownListener

java.lang.Object
io.micronaut.runtime.graceful.GracefulShutdownListener
All Implemented Interfaces:
ApplicationEventListener<ShutdownEvent>, Ordered, EventListener

@Singleton @Requires(bean=GracefulShutdownManager.class) @Requires(property="micronaut.lifecycle.graceful-shutdown.enabled",value="true",defaultValue="false") public final class GracefulShutdownListener extends Object implements ApplicationEventListener<ShutdownEvent>, Ordered
Listener that intercepts ShutdownEvent to initiate and wait for a graceful shutdown, if configured.
Since:
4.9.0
Author:
Jonas Konrad