Interface GuiceyLifecycleListener
- All Known Implementing Classes:
ApplicationShutdownListenerAdapter,ApplicationStartupListenerAdapter,ConfigurationDiagnostic,ExtensionsHelpDiagnostic,GuiceAopDiagnostic,GuiceBindingsDiagnostic,GuiceyLifecycleAdapter,GuiceyStartupListenerAdapter,JerseyConfigDiagnostic,LifecycleDiagnostic,SharedStateDiagnostic,StartupTimeDiagnostic,UniqueGuiceyLifecycleListener,WebMappingsDiagnostic,YamlBindingsDiagnostic
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Guicey lifecycle listener covers all valuable phases of guicey configuration. It could be used either for
startup monitoring or for some advanced features implementation (based on installers, extensions modules or bundles
post-processing).
Example usage: LifecycleDiagnostic.
Listener is not registered if equal listener were already registered (Set used as
listeners storage), so if you need to be sure that only one instance of some listener will be used
implement Object.equals(Object) and Object.hashCode(). For example, this is used to resolve case
where DiagnosticHook installed and some reports were already enabled
in bundle directly: thanks to correct equals in reports, user will not see duplicate reports.
- Since:
- 17.04.2018
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidonEvent(GuiceyLifecycleEvent event) Called with specific lifecycle event.
-
Method Details
-
onEvent
Called with specific lifecycle event. Event object may contain event specific objects. Event always contain main objects, available at this point (like configuration, environment, injector etc).- Parameters:
event- event instance- See Also:
-