Interface ApplicationShutdownListener

  • Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface ApplicationShutdownListener
    Dropwizard application shut down listener. Useful for an additional shutdown logic. Supposed to be used instead of ServerLifecycleListener (because server listener is not called for guicey lightweight tests) and instead of LifeCycle.Listener in cases when only shutdown event is important (easier to use).
    Since:
    24.02.2025
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void stopped​(com.google.inject.Injector injector)
      Called after server shutdown (including shutdown after lightweight guicey tests).
    • Method Detail

      • stopped

        void stopped​(com.google.inject.Injector injector)
        Called after server shutdown (including shutdown after lightweight guicey tests).

        Only an injector is provided because all other objects could be obtained from it, if required.

        Parameters:
        injector - guice injector