Class ApplicationRunEvent


public class ApplicationRunEvent extends InjectorPhaseEvent
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:
  • Constructor Details

    • ApplicationRunEvent

      public ApplicationRunEvent(EventsContext context)
      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