public interface GuiceyBundle
Bundle
.
It may be used for installers or extensions registration (or installers substitution).
Bundles may be useful when autoscan is not used to simplify configuration.
Bundle should be registered into GuiceBundle
builder.
Dropwizard bundle may also be guicey bundle (in order to use single extension mechanism).
By default, dropwizard bundles lookup is disabled, to enable it use
GuiceBundle.Builder.configureFromDropwizardBundles(boolean)
.
When enabled, all registered bundles are checked if they implement GuiceyBundle
.
Modifier and Type | Method and Description |
---|---|
void |
initialize(GuiceyBootstrap bootstrap)
Called in run phase.
|
void initialize(GuiceyBootstrap bootstrap)
GuiceyBootstrap
contains almost the same methods as
GuiceBundle.Builder
, which allows to register installers, extensions
and guice modules. Existing installer could be replaced by disabling old one and registering new.
WARNING: don't assume that this method will be called before or after dropwizard bundle run method (both possible). If configuration or environment objects required, they may be obtained from bootstrap.
bootstrap
- guicey bootstrap object