Class MultiHandlerEnhancerDefinition
java.lang.Object
org.axonframework.messaging.core.annotation.MultiHandlerEnhancerDefinition
- All Implemented Interfaces:
HandlerEnhancerDefinition
HandlerEnhancerDefinition instance that delegates to multiple other instances, in the order provided.
- Since:
- 3.3.0
- Author:
- Tyler Thrailkill
-
Constructor Summary
ConstructorsConstructorDescriptionInitializes an instance that delegates to the givendelegates, in the order provided.MultiHandlerEnhancerDefinition(HandlerEnhancerDefinition... delegates) Initializes an instance that delegates to the givendelegates, in the order provided. -
Method Summary
Modifier and TypeMethodDescriptionReturns the delegates of this instance, in the order they are evaluated to resolve parameters.ordered(Collection<HandlerEnhancerDefinition> delegates) Creates a MultiHandlerEnhancerDefinition instance with the givendelegates, which are automatically ordered based on the@Priorityannotation on their respective classes.ordered(HandlerEnhancerDefinition... delegates) Creates a MultiHandlerEnhancerDefinition instance with the givendelegates, which are automatically ordered based on the@Priorityannotation on their respective classes.<T> MessageHandlingMember<T> wrapHandler(MessageHandlingMember<T> original) Enhance the givenoriginalhandler.
-
Constructor Details
-
MultiHandlerEnhancerDefinition
Initializes an instance that delegates to the givendelegates, in the order provided. Changes in the given array are not reflected in the created instance.- Parameters:
delegates- The enhancers providing the parameter values to use
-
MultiHandlerEnhancerDefinition
Initializes an instance that delegates to the givendelegates, in the order provided. Changes in the given List are not reflected in the created instance.- Parameters:
delegates- The list of enhancers providing the parameter values to use
-
-
Method Details
-
ordered
Creates a MultiHandlerEnhancerDefinition instance with the givendelegates, which are automatically ordered based on the@Priorityannotation on their respective classes. Classes with the same Priority are kept in the order as provided in thedelegates.If one of the delegates is a MultiHandlerEnhancerDefinition itself, that factory's delegates are 'mixed' with the given
delegates, based on their respective order.- Parameters:
delegates- The delegates to include in the factory- Returns:
- an instance delegating to the given
delegates
-
ordered
public static MultiHandlerEnhancerDefinition ordered(Collection<HandlerEnhancerDefinition> delegates) Creates a MultiHandlerEnhancerDefinition instance with the givendelegates, which are automatically ordered based on the@Priorityannotation on their respective classes. Classes with the same Priority are kept in the order as provided in thedelegates.If one of the delegates is a MultiHandlerEnhancerDefinition itself, that factory's delegates are 'mixed' with the given
delegates, based on their respective order.- Parameters:
delegates- The delegates to include in the factory- Returns:
- an instance delegating to the given
delegates
-
getDelegates
Returns the delegates of this instance, in the order they are evaluated to resolve parameters.- Returns:
- the delegates of this instance, in the order they are evaluated to resolve parameters
-
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
-