Class ApplicationRunEvent


  • public class ApplicationRunEvent
    extends InjectorPhaseEvent
    Called after 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).

    Since:
    19.04.2018
    See Also:
    for listeners usage example
    • 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
        See Also:
        AbstractLifeCycle.AbstractLifeCycleListener
      • registerJerseyListener

        public void registerJerseyListener​(org.glassfish.jersey.server.monitoring.ApplicationEventListener listener)
        Parameters:
        listener - jersey listener
        See Also:
        for available events