Interface ApplicationStartupListener

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 ApplicationStartupListener
Dropwizard application complete startup listener. Useful for delayed code execution after server startup. 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 startup event is important (easier to use).

It also receives application injector to simplify usage.

Since:
28.09.2019
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    started(com.google.inject.Injector injector)
    Called after server startup or after guicey initialization in guicey-only tests.
  • Method Details

    • started

      void started(com.google.inject.Injector injector) throws Exception
      Called after server startup or after guicey initialization in guicey-only tests.

      Any thrown exception would shutdown startup.

      Parameters:
      injector - gucie injector
      Throws:
      Exception - in case of errors