Class ApplicationStartedEvent
- 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.JerseyPhaseEvent
-
- ru.vyarus.dropwizard.guice.module.lifecycle.event.jersey.ApplicationStartedEvent
-
public class ApplicationStartedEvent extends JerseyPhaseEvent
Called after complete dropwizard startup. Actually the same as jetty lifecycle started event (LifeCycle.Listener.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 cast in guicey tests (
TestGuiceyApp
) when web part is not started.- Since:
- 16.08.2019
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class ru.vyarus.dropwizard.guice.module.lifecycle.event.InjectorPhaseEvent
InjectorPhaseEvent.ReportRenderer
-
-
Constructor Summary
Constructors Constructor Description ApplicationStartedEvent(EventsContext context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isJettyStarted()
As event fired for both real server startup and guicey lightweight tests, this property allows differentiating situations.java.lang.String
renderJerseyConfig(JerseyConfig config)
Render jersey configuration report.-
Methods inherited from class ru.vyarus.dropwizard.guice.module.lifecycle.event.JerseyPhaseEvent
getInjectionManager
-
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
-
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 differentiating situations.- Returns:
- true if jetty was started and false in case of guicey lightweight tests
- See Also:
TestGuiceyApp
-
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
-
-