Class CompletionRegisteringAdvisor
java.lang.Object
org.springframework.aop.support.AbstractPointcutAdvisor
org.springframework.modulith.events.support.CompletionRegisteringAdvisor
- All Implemented Interfaces:
Serializable,Advisor,PointcutAdvisor,Ordered
An
Advisor to decorate TransactionalEventListener annotated methods to mark
the previously registered event publications as completed on successful method execution.- Author:
- Oliver Drotbohm
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static classMethodInterceptorto trigger the completion of an event publication after a transaction event listener method has been completed successfully. -
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
ConstructorsConstructorDescriptionDeprecated, for removal: This API element is subject to removal in a future version.since 2.2, 2.1.2, for removal in 2.3.CompletionRegisteringAdvisor(Supplier<EventPublicationRegistry> registry, EventListenerMethodMetadata metadata) Creates a newCompletionRegisteringAdvisorfor the givenEventPublicationRegistry, only decorating methods that actually trigger an entry in the former according to the givenEventListenerMethodMetadata. -
Method Summary
Methods 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
-
CompletionRegisteringAdvisor
@Deprecated(since="2.2, 2.1.2", forRemoval=true) public CompletionRegisteringAdvisor(Supplier<EventPublicationRegistry> registry) Deprecated, for removal: This API element is subject to removal in a future version.since 2.2, 2.1.2, for removal in 2.3. UseCompletionRegisteringAdvisor(Supplier, EventListenerMethodMetadata)instead to honor the configured registry trigger annotation.Creates a newCompletionRegisteringAdvisorfor the givenEventPublicationRegistry, decorating allTransactionalEventListenerannotated methods, no matter whether they are selected viaspring.modulith.events.registry-trigger-annotation.- Parameters:
registry- must not be null.
-
CompletionRegisteringAdvisor
public CompletionRegisteringAdvisor(Supplier<EventPublicationRegistry> registry, EventListenerMethodMetadata metadata) Creates a newCompletionRegisteringAdvisorfor the givenEventPublicationRegistry, only decorating methods that actually trigger an entry in the former according to the givenEventListenerMethodMetadata.- Parameters:
registry- must not be null.metadata- must not be null.- Since:
- 2.2, 2.1.2
-
-
Method Details
-
getPointcut
-
getAdvice
-