Interface GuiceyStartupListener<T extends io.dropwizard.core.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.core.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
-
Method Details
-
configure
void configure(T config, io.dropwizard.core.setup.Environment env, com.google.inject.Injector injector) throws Exception Called after guicey startup to perform manual configurations usingInjector.Any thrown exception would shutdown startup.
- Parameters:
config- configuration objectenv- environment objectinjector- guice injector- Throws:
Exception- in case of errors
-