public class ApplicationRunEvent extends InjectorPhaseEvent
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).
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.Configuration, io.dropwizard.setup.Environment). Ideal point
for jersey and jetty listeners installation (use shortcut methods in event for registration).
for listeners usage exampleInjectorPhaseEvent.ReportRenderer| Constructor and Description |
|---|
ApplicationRunEvent(EventsContext context) |
| Modifier and Type | Method and Description |
|---|---|
void |
registerJerseyListener(org.glassfish.jersey.server.monitoring.ApplicationEventListener listener) |
void |
registerJettyListener(org.eclipse.jetty.util.component.LifeCycle.Listener listener) |
getConfigurationInfo, getInjector, getReportRenderergetConfiguration, getConfigurationTree, getEnvironment, renderConfigurationBindingsgetBootstrapgetOptions, getSharedState, getTypepublic ApplicationRunEvent(EventsContext context)
public void registerJettyListener(org.eclipse.jetty.util.component.LifeCycle.Listener listener)
listener - jetty listenerAbstractLifeCycle.AbstractLifeCycleListenerpublic void registerJerseyListener(org.glassfish.jersey.server.monitoring.ApplicationEventListener listener)
listener - jersey listenerfor available events