Class ApplicationStartedEvent


  • public class ApplicationStartedEvent
    extends JerseyPhaseEvent
    Called after complete dropwizard startup. Actually the same as jetty lifecycle started event ( AbstractLifeCycle.AbstractLifeCycleListener.lifeCycleStarted( org.eclipse.jetty.util.component.LifeCycle)), which is called after complete jetty startup.

    May be used as assured "started" point (after all initializations). For example, to report something. This event also will be casted in guicey tests (GuiceyAppRule) when web part is not started.

    Since:
    16.08.2019
    • Constructor Detail

      • ApplicationStartedEvent

        public ApplicationStartedEvent​(EventsContext context)
    • Method Detail

      • isJettyStarted

        public boolean isJettyStarted()
        As event fired for both real server startup and guicey lightweight tests, this property allows to differentiate situations.
        Returns:
        true if jetty was started and false in case of guicey lightweight tests
        See Also:
        UseGuiceyApp, GuiceyAppRule
      • renderJerseyConfig

        public java.lang.String renderJerseyConfig​(JerseyConfig config)
        Render jersey configuration report.

        It is impossible to render this report under lightweight guicey tests (because jersey context is obviously not started).

        Parameters:
        config - config object
        Returns:
        rendered configuration or empty string if called under lightweight guicey test