public class LifecycleDiagnostic extends UniqueGuiceyLifecycleListener
GuiceBundle.Builder.printLifecyclePhases().
Use system out instead of logger because logger in not initialized in time of first events and for more clarity.
Split logs with current phase name and startup timer. This should clarify custom logic execution times.
If multiple listeners registered, only first registered will be actually used (allow safe multiple registrations).
| Constructor and Description |
|---|
LifecycleDiagnostic(boolean showDetails) |
| 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 |
bundlesInitialized(BundlesInitializedEvent event)
Called after bundles initialization.
|
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 |
extensionsResolved(ExtensionsResolvedEvent event)
Called when all extensions detected (from classpath scan and guice modules).
|
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 |
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.
|
equals, hashCodeapplicationShutdown, applicationStarted, beforeRun, bundlesResolved, extensionsInstalledBy, initialized, jerseyExtensionsInstalledBy, onEventprotected void configurationHooksProcessed(ConfigurationHooksProcessedEvent event)
GuiceyLifecycleAdapterGuiceBundle.Builder.build() after manual
builder configuration and all GuiceyConfigurationHook processing.
Not called when no hooks were used.configurationHooksProcessed in class GuiceyLifecycleAdapterevent - event objectGuiceyLifecycle.ConfigurationHooksProcessedprotected void dropwizardBundlesInitialized(DropwizardBundlesInitializedEvent event)
GuiceyLifecycleAdapterdropwizardBundlesInitialized in class GuiceyLifecycleAdapterevent - event objectGuiceyLifecycle.DropwizardBundlesInitializedprotected void lookupBundlesResolved(BundlesFromLookupResolvedEvent event)
GuiceyLifecycleAdapterlookupBundlesResolved in class GuiceyLifecycleAdapterevent - event objectGuiceyLifecycle.BundlesFromLookupResolvedprotected void bundlesInitialized(BundlesInitializedEvent event)
GuiceyLifecycleAdapterbundlesInitialized in class GuiceyLifecycleAdapterevent - event objectGuiceyLifecycle.BundlesInitializedprotected void commandsResolved(CommandsResolvedEvent event)
GuiceyLifecycleAdapterGuiceBundle.Builder.searchCommands())
and at least one command found. Not called otherwise.commandsResolved in class GuiceyLifecycleAdapterevent - event objectGuiceyLifecycle.CommandsResolvedprotected void installersResolved(InstallersResolvedEvent event)
GuiceyLifecycleAdapterinstallersResolved in class GuiceyLifecycleAdapterevent - event objectGuiceyLifecycle.InstallersResolvedprotected void manualExtensionsValidated(ManualExtensionsValidatedEvent event)
GuiceyLifecycleAdaptermanualExtensionsValidated in class GuiceyLifecycleAdapterevent - event objectGuiceyLifecycle.ManualExtensionsValidatedprotected void classpathExtensionsResolved(ClasspathExtensionsResolvedEvent event)
GuiceyLifecycleAdapterclasspathExtensionsResolved in class GuiceyLifecycleAdapterevent - event objectGuiceyLifecycle.ClasspathExtensionsResolvedprotected void bundlesStarted(BundlesStartedEvent event)
GuiceyLifecycleAdapterbundlesStarted in class GuiceyLifecycleAdapterevent - event objectGuiceyLifecycle.BundlesStartedprotected void modulesAnalyzed(ModulesAnalyzedEvent event)
GuiceyLifecycleAdaptermodulesAnalyzed in class GuiceyLifecycleAdapterevent - event objectGuiceyLifecycle.ModulesAnalyzedprotected void extensionsResolved(ExtensionsResolvedEvent event)
GuiceyLifecycleAdapterextensionsResolved in class GuiceyLifecycleAdapterevent - event objectGuiceyLifecycle.ExtensionsResolvedprotected void injectorCreation(InjectorCreationEvent event)
GuiceyLifecycleAdapterinjectorCreation in class GuiceyLifecycleAdapterevent - event objectGuiceyLifecycle.InjectorCreationprotected void extensionsInstalled(ExtensionsInstalledEvent event)
GuiceyLifecycleAdapterextensionsInstalled in class GuiceyLifecycleAdapterevent - event objectGuiceyLifecycle.ExtensionsInstalledprotected void applicationRun(ApplicationRunEvent event)
GuiceyLifecycleAdapterGuiceBundle.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).applicationRun in class GuiceyLifecycleAdapterevent - event objectGuiceyLifecycle.ApplicationRunprotected void jerseyConfiguration(JerseyConfigurationEvent event)
GuiceyLifecycleAdapterInjectionManager
is accessible.jerseyConfiguration in class GuiceyLifecycleAdapterevent - event objectGuiceyLifecycle.JerseyConfigurationprotected void jerseyExtensionsInstalled(JerseyExtensionsInstalledEvent event)
GuiceyLifecycleAdapterJerseyInstaller installers install
related extensions and only when at least one extension was installed.jerseyExtensionsInstalled in class GuiceyLifecycleAdapterevent - event objectGuiceyLifecycle.JerseyExtensionsInstalled