Class PersistentApplicationEventMulticaster
java.lang.Object
org.springframework.context.event.AbstractApplicationEventMulticaster
org.springframework.modulith.events.support.PersistentApplicationEventMulticaster
- All Implemented Interfaces:
Aware
,BeanClassLoaderAware
,BeanFactoryAware
,SmartInitializingSingleton
,ApplicationEventMulticaster
public class PersistentApplicationEventMulticaster
extends AbstractApplicationEventMulticaster
implements SmartInitializingSingleton
An
ApplicationEventMulticaster
to register EventPublication
s in an EventPublicationRegistry
so that potentially failing transactional event listeners can get re-invoked upon application restart or via a
schedule.
Republication is handled in afterSingletonsInstantiated()
inspecting the EventPublicationRegistry
for incomplete publications and
- Author:
- Oliver Drotbohm
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescription(package private) static class
First-class collection to work with transactional event listeners, i.e. -
Constructor Summary
ConstructorDescriptionCreates a newPersistentApplicationEventMulticaster
for the givenEventPublicationRegistry
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
multicastEvent
(ApplicationEvent event) void
multicastEvent
(ApplicationEvent event, ResolvableType eventType) protected boolean
supportsEvent
(ApplicationListener<?> listener, ResolvableType eventType, Class<?> sourceType) Temporary workaround for an issue in Spring Framework that lets ApplicationListenerMethodAdapter match all generic events with unresolved generics.Methods inherited from class org.springframework.context.event.AbstractApplicationEventMulticaster
addApplicationListener, addApplicationListenerBean, getApplicationListeners, getApplicationListeners, removeAllListeners, removeApplicationListener, removeApplicationListenerBean, removeApplicationListenerBeans, removeApplicationListeners, setBeanClassLoader, setBeanFactory, supportsEvent
-
Constructor Details
-
PersistentApplicationEventMulticaster
Creates a newPersistentApplicationEventMulticaster
for the givenEventPublicationRegistry
.- Parameters:
registry
- must not be null.
-
-
Method Details
-
multicastEvent
- Specified by:
multicastEvent
in interfaceApplicationEventMulticaster
-
multicastEvent
- Specified by:
multicastEvent
in interfaceApplicationEventMulticaster
-
afterSingletonsInstantiated
public void afterSingletonsInstantiated()- Specified by:
afterSingletonsInstantiated
in interfaceSmartInitializingSingleton
-
supportsEvent
protected boolean supportsEvent(ApplicationListener<?> listener, ResolvableType eventType, Class<?> sourceType) Temporary workaround for an issue in Spring Framework that lets ApplicationListenerMethodAdapter match all generic events with unresolved generics.- Overrides:
supportsEvent
in classAbstractApplicationEventMulticaster
- See Also:
-