Class ApplicationReadyEvent
java.lang.Object
java.util.EventObject
org.springframework.context.ApplicationEvent
org.springframework.boot.context.event.SpringApplicationEvent
org.springframework.boot.context.event.ApplicationReadyEvent
- All Implemented Interfaces:
- Serializable
Event published as late as conceivably possible to indicate that the application is
ready to service requests. The source of the event is the 
SpringApplication
itself, but beware of modifying its internal state since all initialization steps will
have been completed by then.- Since:
- 1.3.0
- Author:
- Stephane Nicoll, Chris Bono
- See Also:
- 
Field SummaryFields inherited from class EventObjectsource
- 
Constructor SummaryConstructorsConstructorDescriptionApplicationReadyEvent(SpringApplication application, String[] args, ConfigurableApplicationContext context, @Nullable Duration timeTaken) Create a newApplicationReadyEventinstance.
- 
Method SummaryModifier and TypeMethodDescriptionReturn the application context.@Nullable DurationReturn the time taken for the application to be ready to service requests, ornullif unknown.Methods inherited from class SpringApplicationEventgetArgs, getSpringApplicationMethods inherited from class ApplicationEventgetTimestampMethods inherited from class EventObjectgetSource, toString
- 
Constructor Details- 
ApplicationReadyEventpublic ApplicationReadyEvent(SpringApplication application, String[] args, ConfigurableApplicationContext context, @Nullable Duration timeTaken) Create a newApplicationReadyEventinstance.- Parameters:
- application- the current application
- args- the arguments the application is running with
- context- the context that was being created
- timeTaken- the time taken to get the application ready to service requests
- Since:
- 2.6.0
 
 
- 
- 
Method Details- 
getApplicationContextReturn the application context.- Returns:
- the context
 
- 
getTimeTakenReturn the time taken for the application to be ready to service requests, ornullif unknown.- Returns:
- the time taken to be ready to service requests
- Since:
- 2.6.0
 
 
-