public class ApplicationReadyEvent extends SpringApplicationEvent
SpringApplication
itself, but beware of modifying its internal state since all initialization steps will
have been completed by then.ApplicationFailedEvent
,
Serialized Formsource
Constructor and Description |
---|
ApplicationReadyEvent(SpringApplication application,
String[] args,
ConfigurableApplicationContext context)
Deprecated.
since 2.6.0 for removal in 3.0.0 in favor of
ApplicationReadyEvent(SpringApplication, String[], ConfigurableApplicationContext, Duration) |
ApplicationReadyEvent(SpringApplication application,
String[] args,
ConfigurableApplicationContext context,
Duration timeTaken)
Create a new
ApplicationReadyEvent instance. |
Modifier and Type | Method and Description |
---|---|
ConfigurableApplicationContext |
getApplicationContext()
Return the application context.
|
Duration |
getTimeTaken()
Return the time taken for the application to be ready to service requests, or
null if unknown. |
getArgs, getSpringApplication
getTimestamp
getSource, toString
@Deprecated public ApplicationReadyEvent(SpringApplication application, String[] args, ConfigurableApplicationContext context)
ApplicationReadyEvent(SpringApplication, String[], ConfigurableApplicationContext, Duration)
ApplicationReadyEvent
instance.application
- the current applicationargs
- the arguments the application is running withcontext
- the context that was being createdpublic ApplicationReadyEvent(SpringApplication application, String[] args, ConfigurableApplicationContext context, Duration timeTaken)
ApplicationReadyEvent
instance.application
- the current applicationargs
- the arguments the application is running withcontext
- the context that was being createdtimeTaken
- the time taken to get the application ready to service requestspublic ConfigurableApplicationContext getApplicationContext()
public Duration getTimeTaken()
null
if unknown.