@FunctionalInterface public interface ApplicationEventPublisher
Serves as a super-interface for ApplicationContext.
ApplicationContext, 
ApplicationEventPublisherAware, 
ApplicationEvent, 
ApplicationEventMulticaster, 
EventPublicationInterceptor| Modifier and Type | Method and Description | 
|---|---|
| default void | publishEvent(ApplicationEvent event)Notify all matching listeners registered with this
 application of an application event. | 
| void | publishEvent(Object event)Notify all matching listeners registered with this
 application of an event. | 
default void publishEvent(ApplicationEvent event)
Such an event publication step is effectively a hand-off to the multicaster and does not imply synchronous/asynchronous execution or even immediate execution at all. Event listeners are encouraged to be as efficient as possible, individually using asynchronous execution for longer-running and potentially blocking operations.
event - the event to publishpublishEvent(Object), 
ContextRefreshedEvent, 
ContextClosedEventvoid publishEvent(Object event)
If the specified event is not an ApplicationEvent,
 it is wrapped in a PayloadApplicationEvent.
 
Such an event publication step is effectively a hand-off to the multicaster and does not imply synchronous/asynchronous execution or even immediate execution at all. Event listeners are encouraged to be as efficient as possible, individually using asynchronous execution for longer-running and potentially blocking operations.
event - the event to publishpublishEvent(ApplicationEvent), 
PayloadApplicationEvent