Class HierarchicalHandlerEnhancerDefinitionConfigurationEnhancer
java.lang.Object
org.axonframework.messaging.core.reflection.HierarchicalHandlerEnhancerDefinitionConfigurationEnhancer
- All Implemented Interfaces:
ConfigurationEnhancer
@RegistrationScope("Register the decorator once at the root; do not re-invoke in child module registries. The decorator function resolves config.getParent() lazily, at each module\'s own resolution time, so the single DecoratorDefinition copied down on its own already composes every module correctly with its own parent. Re-invoking per nesting level would register the decorator again, composing the parent\'s contribution into a module\'s own HandlerEnhancerDefinition twice.")
public class HierarchicalHandlerEnhancerDefinitionConfigurationEnhancer
extends Object
implements ConfigurationEnhancer
ConfigurationEnhancer that registers a decorator for the HandlerEnhancerDefinition that, when a
parent configuration is present, composes both the parent and the current
HandlerEnhancerDefinition into a MultiHandlerEnhancerDefinition.
Without this enhancer, a HandlerEnhancerDefinition registered at a parent Configuration (e.g. a
top-level MessagingConfigurer) would not be visible to a module's own, separate ComponentRegistry
(e.g. an EventSourcedEntityModule), since every module resolves its own HandlerEnhancerDefinition
component independently.
- Since:
- 5.3.2
- Author:
- Steven van Beelen
- See Also:
-
Constructor Details
-
HierarchicalHandlerEnhancerDefinitionConfigurationEnhancer
public HierarchicalHandlerEnhancerDefinitionConfigurationEnhancer()
-
-
Method Details
-
enhance
Description copied from interface:ConfigurationEnhancer- Specified by:
enhancein interfaceConfigurationEnhancer- Parameters:
componentRegistry- The registry instance to enhance.
-