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
-
public class ApplicationRunEvent extends InjectorPhaseEvent
Called afterGuiceBundle.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:
for listeners usage example
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class ru.vyarus.dropwizard.guice.module.lifecycle.event.InjectorPhaseEvent
InjectorPhaseEvent.ReportRenderer
-
-
Constructor Summary
Constructors Constructor Description ApplicationRunEvent(EventsContext context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
registerJerseyListener(org.glassfish.jersey.server.monitoring.ApplicationEventListener listener)
void
registerJettyListener(org.eclipse.jetty.util.component.LifeCycle.Listener listener)
-
Methods inherited from class ru.vyarus.dropwizard.guice.module.lifecycle.event.InjectorPhaseEvent
getConfigurationInfo, getInjector, getReportRenderer
-
Methods inherited from class ru.vyarus.dropwizard.guice.module.lifecycle.event.RunPhaseEvent
getConfiguration, getConfigurationTree, getEnvironment, renderConfigurationBindings
-
Methods inherited from class ru.vyarus.dropwizard.guice.module.lifecycle.event.ConfigurationPhaseEvent
getBootstrap
-
Methods inherited from class ru.vyarus.dropwizard.guice.module.lifecycle.event.GuiceyLifecycleEvent
getOptions, getSharedState, getType
-
-
-
-
Constructor Detail
-
ApplicationRunEvent
public ApplicationRunEvent(EventsContext context)
-
-
Method Detail
-
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
-
-