public class GuiceyLifecycleAdapter extends java.lang.Object implements GuiceyLifecycleListener
GuiceyLifecycleListener. Useful when you need to listen for multiple events: extend adapter
and override just required methods.| Constructor and Description |
|---|
GuiceyLifecycleAdapter() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
applicationRun(ApplicationRunEvent event)
Called after
GuiceBundle.run(io.dropwizard.Configuration, io.dropwizard.setup.Environment)
when guicey context is started, extensions installed (but not hk extensions, because neither jersey nor jetty
isn't start yet). |
protected void |
applicationShutdown(ApplicationShotdownEvent event)
Called on application shutdown start.
|
protected void |
applicationStarted(ApplicationStartedEvent event)
Called after complete dropwizard startup.
|
protected void |
beforeRun(BeforeRunEvent event)
Meta event.
|
protected void |
bundlesInitialized(BundlesInitializedEvent event)
Called after bundles initialization.
|
protected void |
bundlesResolved(BundlesResolvedEvent event)
Called when all bundles are resolved (after dw recognition and lookup).
|
protected void |
bundlesStarted(BundlesStartedEvent event)
Called after bundles start (run method call).
|
protected void |
classpathExtensionsResolved(ClasspathExtensionsResolvedEvent event)
Called when classes from classpath scan analyzed and all extensions detected.
|
protected void |
commandsResolved(CommandsResolvedEvent event)
Called if commands search is enabled (
GuiceBundle.Builder.searchCommands())
and at least one command found. |
protected void |
configurationHooksProcessed(ConfigurationHooksProcessedEvent event)
Appeared just in time of
GuiceBundle.Builder.build() after manual
builder configuration and all GuiceyConfigurationHook processing. |
protected void |
dropwizardBundlesInitialized(DropwizardBundlesInitializedEvent event)
Called after dropwizard bundles initialization (for dropwizard bundles registered through guicey api).
|
protected void |
extensionsInstalled(ExtensionsInstalledEvent event)
Called after all installers install related extensions.
|
protected void |
extensionsInstalledBy(ExtensionsInstalledByEvent event)
Called when installer installed all related extensions and only for installers actually performed
installations (extensions list never empty).
|
protected void |
extensionsResolved(ExtensionsResolvedEvent event)
Called when all extensions detected (from classpath scan and guice modules).
|
protected void |
initialized(InitializedEvent event)
Called after guicey initialization (includes bundles lookup and initialization,
installers and extensions resolution).
|
protected void |
injectorCreation(InjectorCreationEvent event)
Called just before guice injector creation.
|
protected void |
installersResolved(InstallersResolvedEvent event)
Called after all installers resolved (including installers found with classpath scan) and prepared for
processing extensions.
|
protected void |
jerseyConfiguration(JerseyConfigurationEvent event)
Jersey context starting.
|
protected void |
jerseyExtensionsInstalled(JerseyExtensionsInstalledEvent event)
Called after all
JerseyInstaller installers install
related extensions and only when at least one extension was installed. |
protected void |
jerseyExtensionsInstalledBy(JerseyExtensionsInstalledByEvent event)
Called when
JerseyInstaller installer installed all
related extensions and only for installers actually performed installations (extensions list never empty). |
protected void |
lookupBundlesResolved(BundlesFromLookupResolvedEvent event)
Called if at least one bundle recognized using bundles lookup.
|
protected void |
manualExtensionsValidated(ManualExtensionsValidatedEvent event)
Called when all manually registered extension classes are recognized by installers (validated).
|
protected void |
modulesAnalyzed(ModulesAnalyzedEvent event)
Called when guice bindings analyzed and all extensions detected.
|
void |
onEvent(GuiceyLifecycleEvent event)
Called with specific lifecycle event.
|
public void onEvent(GuiceyLifecycleEvent event)
GuiceyLifecycleListeneronEvent in interface GuiceyLifecycleListenerevent - event instancefor possible event typesprotected void configurationHooksProcessed(ConfigurationHooksProcessedEvent event)
GuiceBundle.Builder.build() after manual
builder configuration and all GuiceyConfigurationHook processing.
Not called when no hooks were used.event - event objectGuiceyLifecycle.ConfigurationHooksProcessedprotected void dropwizardBundlesInitialized(DropwizardBundlesInitializedEvent event)
event - event objectGuiceyLifecycle.DropwizardBundlesInitializedprotected void lookupBundlesResolved(BundlesFromLookupResolvedEvent event)
event - event objectGuiceyLifecycle.BundlesFromLookupResolvedprotected void bundlesResolved(BundlesResolvedEvent event)
event - event objectGuiceyLifecycle.BundlesResolvedprotected void bundlesInitialized(BundlesInitializedEvent event)
event - event objectGuiceyLifecycle.BundlesInitializedprotected void commandsResolved(CommandsResolvedEvent event)
GuiceBundle.Builder.searchCommands())
and at least one command found. Not called otherwise.event - event objectGuiceyLifecycle.CommandsResolvedprotected void installersResolved(InstallersResolvedEvent event)
event - event objectGuiceyLifecycle.InstallersResolvedprotected void manualExtensionsValidated(ManualExtensionsValidatedEvent event)
event - event objectGuiceyLifecycle.ManualExtensionsValidatedprotected void classpathExtensionsResolved(ClasspathExtensionsResolvedEvent event)
event - event objectGuiceyLifecycle.ClasspathExtensionsResolvedprotected void initialized(InitializedEvent event)
event - event objectGuiceyLifecycle.Initializedprotected void beforeRun(BeforeRunEvent event)
event - event objectGuiceyLifecycle.BeforeRunprotected void bundlesStarted(BundlesStartedEvent event)
event - event objectGuiceyLifecycle.BundlesStartedprotected void modulesAnalyzed(ModulesAnalyzedEvent event)
event - event objectGuiceyLifecycle.ModulesAnalyzedprotected void extensionsResolved(ExtensionsResolvedEvent event)
event - event objectGuiceyLifecycle.ExtensionsResolvedprotected void injectorCreation(InjectorCreationEvent event)
event - event objectGuiceyLifecycle.InjectorCreationprotected void extensionsInstalledBy(ExtensionsInstalledByEvent event)
event - event objectGuiceyLifecycle.ExtensionsInstalledByprotected void extensionsInstalled(ExtensionsInstalledEvent event)
event - event objectGuiceyLifecycle.ExtensionsInstalledprotected void applicationRun(ApplicationRunEvent event)
GuiceBundle.run(io.dropwizard.Configuration, io.dropwizard.setup.Environment)
when guicey context is started, extensions installed (but not hk extensions, because neither jersey nor jetty
isn't start yet).event - event objectGuiceyLifecycle.ApplicationRunprotected void jerseyConfiguration(JerseyConfigurationEvent event)
InjectionManager
is accessible.event - event objectGuiceyLifecycle.JerseyConfigurationprotected void jerseyExtensionsInstalledBy(JerseyExtensionsInstalledByEvent event)
JerseyInstaller installer installed all
related extensions and only for installers actually performed installations (extensions list never empty).event - event objectGuiceyLifecycle.JerseyExtensionsInstalledByprotected void jerseyExtensionsInstalled(JerseyExtensionsInstalledEvent event)
JerseyInstaller installers install
related extensions and only when at least one extension was installed.event - event objectGuiceyLifecycle.JerseyExtensionsInstalledprotected void applicationStarted(ApplicationStartedEvent event)
AbstractLifeCycle.AbstractLifeCycleListener.lifeCycleStarted(
org.eclipse.jetty.util.component.LifeCycle)), which is called after complete jetty startup.event - event objectGuiceyLifecycle.ApplicationStartedprotected void applicationShutdown(ApplicationShotdownEvent event)
AbstractLifeCycle.AbstractLifeCycleListener.lifeCycleStopping(
org.eclipse.jetty.util.component.LifeCycle)).event - event objectGuiceyLifecycle.ApplicationShutdown