Class PersistentApplicationEventMulticaster
java.lang.Object
org.springframework.context.event.AbstractApplicationEventMulticaster
org.springframework.context.event.SimpleApplicationEventMulticaster
org.springframework.modulith.events.support.PersistentApplicationEventMulticaster
- All Implemented Interfaces:
Aware,BeanClassLoaderAware,BeanFactoryAware,ApplicationEventMulticaster
An
ApplicationEventMulticaster to register
EventPublications in an EventPublicationRegistry so that
potentially failing transactional event listeners can get re-invoked upon application restart or via a schedule.- Author:
- Oliver Drotbohm, Seonwoo Jung
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionPersistentApplicationEventMulticaster(Supplier<EventPublicationRegistry> registry, Supplier<Environment> environment) Creates a newPersistentApplicationEventMulticasterfor the givenEventPublicationRegistry. -
Method Summary
Modifier and TypeMethodDescriptionReturns theTransactionalEventListenerscurrently registered with this multicaster.voidmulticastEvent(ApplicationEvent event) voidmulticastEvent(ApplicationEvent event, @Nullable ResolvableType eventType) Methods inherited from class org.springframework.context.event.SimpleApplicationEventMulticaster
getErrorHandler, getTaskExecutor, invokeListener, setErrorHandler, setTaskExecutorMethods inherited from class org.springframework.context.event.AbstractApplicationEventMulticaster
addApplicationListener, addApplicationListenerBean, getApplicationListeners, getApplicationListeners, removeAllListeners, removeApplicationListener, removeApplicationListenerBean, removeApplicationListenerBeans, removeApplicationListeners, setBeanClassLoader, setBeanFactory, supportsEvent, supportsEvent
-
Constructor Details
-
PersistentApplicationEventMulticaster
public PersistentApplicationEventMulticaster(Supplier<EventPublicationRegistry> registry, Supplier<Environment> environment) Creates a newPersistentApplicationEventMulticasterfor the givenEventPublicationRegistry.- Parameters:
registry- must not be null.environment- must not be null.
-
-
Method Details
-
multicastEvent
- Specified by:
multicastEventin interfaceApplicationEventMulticaster- Overrides:
multicastEventin classSimpleApplicationEventMulticaster
-
multicastEvent
- Specified by:
multicastEventin interfaceApplicationEventMulticaster- Overrides:
multicastEventin classSimpleApplicationEventMulticaster
-
getTransactionalEventListeners
Returns theTransactionalEventListenerscurrently registered with this multicaster.- Returns:
- will never be null.
- Since:
- 2.2
-