All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.dropwizard.core.ConfiguredBundle Maven / Gradle / Ivy

There is a newer version: 5.0.0-alpha.4
Show newest version
package io.dropwizard.core;

import io.dropwizard.core.setup.Bootstrap;
import io.dropwizard.core.setup.Environment;

/**
 * A reusable bundle of functionality, used to define blocks of application behavior that are
 * conditional on configuration parameters.
 *
 * @param     the required configuration interface
 */
public interface ConfiguredBundle {
    /**
     * 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
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy