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.ObjectBase 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 dropwizardBootstrapobject)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 (sinceInjectionManagerbecome available)
- Since:
- 19.04.2018
-
-
Constructor Summary
Constructors Constructor Description GuiceyLifecycleEvent(GuiceyLifecycle type, EventsContext context)Create event.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OptionsgetOptions()NOTE: options could only be specified in application class (in bundle definition) and so for all events options will be the same (already defined).SharedConfigurationStategetSharedState()StatsInfogetStats()GuiceyLifecyclegetType()Useful to differentiate events (with switch).
-
-
-
Constructor Detail
-
GuiceyLifecycleEvent
public GuiceyLifecycleEvent(GuiceyLifecycle type, EventsContext context)
Create event.- Parameters:
type- event typecontext- event 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
-
getStats
public StatsInfo getStats()
- Returns:
- tracked stats
-
getSharedState
public SharedConfigurationState getSharedState()
- Returns:
- application shared state
- See Also:
SharedConfigurationState
-
-