Class GuiceyLifecycleEvent
- java.lang.Object
-
- ru.vyarus.dropwizard.guice.module.lifecycle.event.GuiceyLifecycleEvent
-
- Direct Known Subclasses:
ConfigurationHooksProcessedEvent
,ConfigurationPhaseEvent
public abstract class GuiceyLifecycleEvent extends java.lang.Object
Base class for guicey lifecycle events. All events are organized in hierarchy by:GuiceyLifecycleEvent
- lowest level, provides access to options (ideally there should be bootstrap object, which is known for all events, but first eventConfigurationHooksProcessedEvent
) simply don't have access for it.ConfigurationPhaseEvent
- dropwizard configuration phase events (all have access to dropwizardBootstrap
object)RunPhaseEvent
- events started on dropwizard run phase (when configuration is available)InjectorPhaseEvent
- all events after guice injector creationJerseyPhaseEvent
- all events after jersey context initialization start (sinceInjectionManager
become available)
- Since:
- 19.04.2018
-
-
Constructor Summary
Constructors Constructor Description GuiceyLifecycleEvent(GuiceyLifecycle type, EventsContext context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Options
getOptions()
NOTE: options could only be specified in application class (in bundle definition) and so for all events options will be the same (already defined).SharedConfigurationState
getSharedState()
GuiceyLifecycle
getType()
Useful to differentiate events (with switch).
-
-
-
Constructor Detail
-
GuiceyLifecycleEvent
public GuiceyLifecycleEvent(GuiceyLifecycle type, EventsContext context)
-
-
Method Detail
-
getType
public GuiceyLifecycle getType()
Useful to differentiate events (with switch).- Returns:
- type of event
-
getOptions
public Options getOptions()
NOTE: options could only be specified in application class (in bundle definition) and so for all events options will be the same (already defined).- Returns:
- defined options
-
getSharedState
public SharedConfigurationState getSharedState()
- Returns:
- application shared state
- See Also:
SharedConfigurationState
-
-