Created
August 10, 2020 09:06
-
-
Save rafaelbrizola/2a1637bf1ebec04764cf0c32d5f83a12 to your computer and use it in GitHub Desktop.
Dropwizard ConfiguredBundle interface
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* A reusable bundle of functionality, used to define blocks of application behavior that are | |
* conditional on configuration parameters. | |
* | |
* @param <T> the required configuration interface | |
*/ | |
public interface ConfiguredBundle<T> { | |
/** | |
* Initializes the environment. | |
* | |
* @param configuration the configuration object | |
* @param environment the application's {@link Environment} | |
* @throws Exception if something goes wrong | |
*/ | |
default void run(T configuration, Environment environment) throws Exception { | |
// Do nothing | |
} | |
/** | |
* Initializes the application bootstrap. | |
* | |
* @param bootstrap the application bootstrap | |
*/ | |
default void initialize(Bootstrap<?> bootstrap) { | |
// Do nothing | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment