Class ApplicationRunEvent
java.lang.Object
ru.vyarus.dropwizard.guice.module.lifecycle.event.GuiceyLifecycleEvent
ru.vyarus.dropwizard.guice.module.lifecycle.event.ConfigurationPhaseEvent
ru.vyarus.dropwizard.guice.module.lifecycle.event.RunPhaseEvent
ru.vyarus.dropwizard.guice.module.lifecycle.event.InjectorPhaseEvent
ru.vyarus.dropwizard.guice.module.lifecycle.event.run.ApplicationRunEvent
Called after
GuiceBundle.run(io.dropwizard.core.Configuration, io.dropwizard.core.setup.Environment)
when guicey context is started, extensions installed (but not hk extensions, because neither jersey nor jetty
isn't start yet).
At this point injection to registered commands is performed (this may be important if custom command run application instead of "server"). Injector itself is completely initialized - all singletons processed.
This point is before
Application.run(io.dropwizard.core.Configuration, io.dropwizard.core.setup.Environment).
Ideal point for jersey and jetty listeners installation (use shortcut methods in event for registration).
- Since:
- 19.04.2018
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class ru.vyarus.dropwizard.guice.module.lifecycle.event.InjectorPhaseEvent
InjectorPhaseEvent.ReportRenderer -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidregisterJerseyListener(org.glassfish.jersey.server.monitoring.ApplicationEventListener listener) voidregisterJettyListener(org.eclipse.jetty.util.component.LifeCycle.Listener listener) Methods inherited from class ru.vyarus.dropwizard.guice.module.lifecycle.event.InjectorPhaseEvent
getConfigurationInfo, getInjector, getReportRendererMethods inherited from class ru.vyarus.dropwizard.guice.module.lifecycle.event.RunPhaseEvent
getConfiguration, getConfigurationTree, getEnvironment, renderConfigurationBindingsMethods inherited from class ru.vyarus.dropwizard.guice.module.lifecycle.event.ConfigurationPhaseEvent
getBootstrapMethods inherited from class ru.vyarus.dropwizard.guice.module.lifecycle.event.GuiceyLifecycleEvent
getOptions, getSharedState, getStats, getType
-
Constructor Details
-
ApplicationRunEvent
Create event.- Parameters:
context- event context
-
-
Method Details
-
registerJettyListener
public void registerJettyListener(org.eclipse.jetty.util.component.LifeCycle.Listener listener) - Parameters:
listener- jetty listener
-
registerJerseyListener
public void registerJerseyListener(org.glassfish.jersey.server.monitoring.ApplicationEventListener listener) - Parameters:
listener- jersey listener- See Also:
-
for available events
-