public class EventPublishingRunListener extends Object implements SpringApplicationRunListener
SpringApplicationRunListener
to publish SpringApplicationEvent
s.Constructor and Description |
---|
EventPublishingRunListener(SpringApplication application,
String[] args) |
Modifier and Type | Method and Description |
---|---|
void |
contextLoaded(ConfigurableApplicationContext context)
Called once the application context has been loaded but before it has been
refreshed.
|
void |
contextPrepared(ConfigurableApplicationContext context)
Called once the
ApplicationContext has been created and prepared, but
before sources have been loaded. |
void |
environmentPrepared(ConfigurableEnvironment environment)
Called once the environment has been prepared, but before the
ApplicationContext has been created. |
void |
finished(ConfigurableApplicationContext context,
Throwable exception)
Called immediately before the run method finishes.
|
void |
started()
Called immediately when the run method has first started.
|
public EventPublishingRunListener(SpringApplication application, String[] args)
public void started()
SpringApplicationRunListener
started
in interface SpringApplicationRunListener
public void environmentPrepared(ConfigurableEnvironment environment)
SpringApplicationRunListener
ApplicationContext
has been created.environmentPrepared
in interface SpringApplicationRunListener
environment
- the environmentpublic void contextPrepared(ConfigurableApplicationContext context)
SpringApplicationRunListener
ApplicationContext
has been created and prepared, but
before sources have been loaded.contextPrepared
in interface SpringApplicationRunListener
context
- the application contextpublic void contextLoaded(ConfigurableApplicationContext context)
SpringApplicationRunListener
contextLoaded
in interface SpringApplicationRunListener
context
- the application contextpublic void finished(ConfigurableApplicationContext context, Throwable exception)
SpringApplicationRunListener
finished
in interface SpringApplicationRunListener
context
- the application contextexception
- any run exception or null if run completed successfully.Copyright © 2014 Pivotal Software, Inc.. All rights reserved.