Class HandlerTimeoutHandlerEnhancerDefinition
java.lang.Object
org.axonframework.messaging.core.timeout.HandlerTimeoutHandlerEnhancerDefinition
- All Implemented Interfaces:
HandlerEnhancerDefinition
public class HandlerTimeoutHandlerEnhancerDefinition
extends Object
implements HandlerEnhancerDefinition
Inspects message handler and wraps it in a
TimeoutWrappedMessageHandlingMember if the handler should have a
timeout.
The timeout is determined by the HandlerTimeoutConfiguration and the MessageHandlerTimeout annotation
on the message handler method. The annotation takes precedence over the configuration.
- Since:
- 4.11.0
- Author:
- Mitchell Herrijgers
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a newHandlerTimeoutHandlerEnhancerDefinitionwith the given configuration. -
Method Summary
Modifier and TypeMethodDescription<T> MessageHandlingMember<T> wrapHandler(MessageHandlingMember<T> original) Enhance the givenoriginalhandler.
-
Constructor Details
-
HandlerTimeoutHandlerEnhancerDefinition
Creates a newHandlerTimeoutHandlerEnhancerDefinitionwith the given configuration. This configuration will be used as default, but can be overridden by theMessageHandlerTimeoutannotation for individual message handlers.- Parameters:
configuration- The configuration for the timeout settings
-
-
Method Details
-
wrapHandler
Description copied from interface:HandlerEnhancerDefinitionEnhance the givenoriginalhandler. Implementations may return the original message handler.- Specified by:
wrapHandlerin interfaceHandlerEnhancerDefinition- Type Parameters:
T- The type of object that will perform the actual handling of the message- Parameters:
original- The original message handler- Returns:
- The enhanced message handler
-