Interface ShutdownHookRegistrar


public interface ShutdownHookRegistrar
Optional platform hook for lifecycle shutdown events.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Registers a shutdown hook that fires when the platform is stopping.
    default void
    Unregisters a previously registered shutdown hook.
  • Method Details

    • registerShutdownHook

      void registerShutdownHook(Runnable hook)
      Registers a shutdown hook that fires when the platform is stopping.
      Parameters:
      hook - shutdown callback
    • unregisterShutdownHook

      default void unregisterShutdownHook(Runnable hook)
      Unregisters a previously registered shutdown hook.
      Parameters:
      hook - shutdown callback to remove