Class InTransactionCompletionRegisteringAdvisor
java.lang.Object
org.springframework.aop.support.AbstractPointcutAdvisor
org.springframework.modulith.events.support.AbstractCompletionRegisteringAdvisor
org.springframework.modulith.events.support.InTransactionCompletionRegisteringAdvisor
- All Implemented Interfaces:
Serializable,Advisor,PointcutAdvisor,Ordered
An
Advisor to be registered after the transaction interceptor to complete
event publications right before the listener's transaction commits.- Since:
- 2.2
- Author:
- Oliver Drotbohm
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static classMethodInterceptorregistered after the transaction interceptor in the advisor chain of a transactional event listener. -
Field Summary
Fields inherited from interface org.springframework.aop.Advisor
EMPTY_ADVICEFields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
ConstructorsConstructorDescriptionInTransactionCompletionRegisteringAdvisor(Supplier<EventPublicationRegistry> registry, EventListenerMethodMetadata metadata, boolean async) Creates a newInTransactionCompletionRegisteringAdvisor. -
Method Summary
Methods inherited from class org.springframework.modulith.events.support.AbstractCompletionRegisteringAdvisor
getAdvice, getPointcut, isCompletionHandled, markCompletionHandledMethods inherited from class org.springframework.aop.support.AbstractPointcutAdvisor
equals, getOrder, hashCode, setOrderMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.aop.Advisor
isPerInstance
-
Constructor Details
-
InTransactionCompletionRegisteringAdvisor
InTransactionCompletionRegisteringAdvisor(Supplier<EventPublicationRegistry> registry, EventListenerMethodMetadata metadata, boolean async) Creates a newInTransactionCompletionRegisteringAdvisor.- Parameters:
registry- must not be null.metadata- must not be null.async- whether the listener invocation is executed asynchronously, which allows to wait forCompletableFutureresults inside the transaction.
-