Serves as a super-interface for ApplicationContext.
ApplicationContext, ApplicationEventPublisherAware, org.springframework.context.ApplicationEvent , org.springframework.context.event.ApplicationEventMulticaster , org.springframework.context.event.EventPublicationInterceptor , org.springframework.transaction.event.TransactionalApplicationListener
| Modifier and Type | Method and Description |
|---|---|
| public default void | publishEvent(ApplicationEvent
the event to publish event)Notify all matching listeners registered with this application of an application event. |
| public void | publishEvent(Object
the event to publish event)Notify all matching listeners registered with this application of an event. |
| publishEvent | back to summary |
|---|---|
| public default void publishEvent(ApplicationEvent event) Notify 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. For usage in a reactive call stack, include event publication
as a simple hand-off:
For the convenient inclusion of the current transaction context
in a reactive hand-off, consider using
| |
| publishEvent | back to summary |
|---|---|
| public void publishEvent(Object event) Notify all matching listeners registered with this application of an event. If the specified 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. For the convenient inclusion of the current transaction context
in a reactive hand-off, consider using
| |