public class EventPublishingRunListener extends Object implements SpringApplicationRunListener, org.springframework.core.Ordered
SpringApplicationRunListener to publish SpringApplicationEvents.
Uses an internal ApplicationEventMulticaster for the events that are fired
before the context is actually refreshed.
| Constructor and Description |
|---|
EventPublishingRunListener(SpringApplication application,
String[] args) |
| Modifier and Type | Method and Description |
|---|---|
void |
contextLoaded(org.springframework.context.ConfigurableApplicationContext context)
Called once the application context has been loaded but before it has been
refreshed.
|
void |
contextPrepared(org.springframework.context.ConfigurableApplicationContext context)
Called once the
ApplicationContext has been created and prepared, but
before sources have been loaded. |
void |
environmentPrepared(org.springframework.core.env.ConfigurableEnvironment environment)
Called once the environment has been prepared, but before the
ApplicationContext has been created. |
void |
finished(org.springframework.context.ConfigurableApplicationContext context,
Throwable exception)
Called immediately before the run method finishes.
|
int |
getOrder() |
void |
starting()
Called immediately when the run method has first started.
|
public EventPublishingRunListener(SpringApplication application, String[] args)
public int getOrder()
getOrder in interface org.springframework.core.Orderedpublic void starting()
SpringApplicationRunListenerstarting in interface SpringApplicationRunListenerpublic void environmentPrepared(org.springframework.core.env.ConfigurableEnvironment environment)
SpringApplicationRunListenerApplicationContext has been created.environmentPrepared in interface SpringApplicationRunListenerenvironment - the environmentpublic void contextPrepared(org.springframework.context.ConfigurableApplicationContext context)
SpringApplicationRunListenerApplicationContext has been created and prepared, but
before sources have been loaded.contextPrepared in interface SpringApplicationRunListenercontext - the application contextpublic void contextLoaded(org.springframework.context.ConfigurableApplicationContext context)
SpringApplicationRunListenercontextLoaded in interface SpringApplicationRunListenercontext - the application contextpublic void finished(org.springframework.context.ConfigurableApplicationContext context,
Throwable exception)
SpringApplicationRunListenerfinished in interface SpringApplicationRunListenercontext - the application context or null if a failure occurred before the
context was createdexception - any run exception or null if run completed successfully.Copyright © 2017 Pivotal Software, Inc.. All rights reserved.