Interface LifecycleRegistration

All Known Implementing Classes:
AppShutdown

public interface LifecycleRegistration
Provides a way to register for lifecycle events, ensuring that Guice-instantiated classes can be notified.
Author:
Brandon Arp (brandon dot arp at inscopemetrics dot io)
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Registers a method to be called when the application is shutting down.
  • Method Details

    • registerShutdown

      void registerShutdown(Supplier<CompletionStage<Void>> callback)
      Registers a method to be called when the application is shutting down. The shutdown will wait for all CompletionStages to complete before shutting down.
      Parameters:
      callback - The callback to register