Interface GuiceyStartupListener<T extends io.dropwizard.Configuration>

  • Type Parameters:
    T - configuration type
    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 GuiceyStartupListener<T extends io.dropwizard.Configuration>
    Called after guicey startup (after GuiceBundle.run(Configuration, Environment) method ) in order to perform manual configurations: like manual objects registration in dropwizard environment (when dependent guice-managed objects required).
    Since:
    28.09.2019
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void configure​(T config, io.dropwizard.setup.Environment env, com.google.inject.Injector injector)
      Called after guicey startup to perform manual configurations using Injector.
    • Method Detail

      • configure

        void configure​(T config,
                       io.dropwizard.setup.Environment env,
                       com.google.inject.Injector injector)
                throws java.lang.Exception
        Called after guicey startup to perform manual configurations using Injector.

        Any thrown exception would shutdown startup.

        Parameters:
        config - configuration object
        env - environment object
        injector - guice injector
        Throws:
        java.lang.Exception - in case of errors