Interface ApplicationEventPublisher
- All Known Subinterfaces:
- ApplicationContext,- ConfigurableApplicationContext,- ConfigurableWebApplicationContext,- WebApplicationContext
- All Known Implementing Classes:
- AbstractApplicationContext,- AbstractRefreshableApplicationContext,- AbstractRefreshableConfigApplicationContext,- AbstractRefreshableWebApplicationContext,- AbstractXmlApplicationContext,- AnnotationConfigApplicationContext,- AnnotationConfigWebApplicationContext,- ClassPathXmlApplicationContext,- FileSystemXmlApplicationContext,- GenericApplicationContext,- GenericGroovyApplicationContext,- GenericWebApplicationContext,- GenericXmlApplicationContext,- GroovyWebApplicationContext,- StaticApplicationContext,- StaticWebApplicationContext,- XmlWebApplicationContext
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Serves as a super-interface for ApplicationContext.
- Since:
- 1.1.1
- Author:
- Juergen Hoeller, Stephane Nicoll
- See Also:
- 
Method SummaryModifier and TypeMethodDescriptionvoidpublishEvent(Object event) Notify all matching listeners registered with this application of an event.default voidpublishEvent(ApplicationEvent event) Notify all matching listeners registered with this application of an application event.
- 
Method Details- 
publishEventNotify all matching listeners registered with this application of an application event. Events may be framework events (such as ContextRefreshedEvent) or application-specific events.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. - Parameters:
- event- the event to publish
- See Also:
 
- 
publishEventNotify all matching listeners registered with this application of an event.If the specified eventis not anApplicationEvent, it is wrapped in aPayloadApplicationEvent.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. - Parameters:
- event- the event to publish
- Since:
- 4.2
- See Also:
 
 
-