Class HandlerEnhancerDefinitionUtils
java.lang.Object
org.axonframework.messaging.core.configuration.reflection.HandlerEnhancerDefinitionUtils
Utility class that provides methods to register a
HandlerEnhancerDefinition to the
ComponentRegistry.
Ensures that the ComponentRegistry at all times has one HandlerEnhancerDefinition component.
Subsequent invocations of
registerToComponentRegistry(ComponentRegistry, Function)/registerToComponentRegistry(ComponentRegistry, int, Function) will
decorate the existing
HandlerEnhancerDefinition and given HandlerEnhancerDefinition into a
MultiHandlerEnhancerDefinition.
- Since:
- 5.3.2
- Author:
- Steven van Beelen
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidregisterToComponentRegistry(ComponentRegistry componentRegistry, int order, Function<Configuration, HandlerEnhancerDefinition> handlerEnhancerDefinitionBuilder) Register aHandlerEnhancerDefinitionto thecurrentComponentRegistryusing the givenhandlerEnhancerDefinitionBuilderfunction.static voidregisterToComponentRegistry(ComponentRegistry componentRegistry, Function<Configuration, HandlerEnhancerDefinition> handlerEnhancerDefinitionBuilder) Register aHandlerEnhancerDefinitionto thecurrentComponentRegistryusing the givenhandlerEnhancerDefinitionBuilderfunction.
-
Method Details
-
registerToComponentRegistry
public static void registerToComponentRegistry(ComponentRegistry componentRegistry, Function<Configuration, HandlerEnhancerDefinition> handlerEnhancerDefinitionBuilder) Register aHandlerEnhancerDefinitionto thecurrentComponentRegistryusing the givenhandlerEnhancerDefinitionBuilderfunction.It will be registered with order
0.- Parameters:
componentRegistry- theComponentRegistryto register theHandlerEnhancerDefinitionto.handlerEnhancerDefinitionBuilder- theFunctionthat creates theHandlerEnhancerDefinitionbased on theConfiguration
-
registerToComponentRegistry
public static void registerToComponentRegistry(ComponentRegistry componentRegistry, int order, Function<Configuration, HandlerEnhancerDefinition> handlerEnhancerDefinitionBuilder) Register aHandlerEnhancerDefinitionto thecurrentComponentRegistryusing the givenhandlerEnhancerDefinitionBuilderfunction.- Parameters:
componentRegistry- theComponentRegistryto register theHandlerEnhancerDefinitiontoorder- the order in which theHandlerEnhancerDefinitionshould be registeredhandlerEnhancerDefinitionBuilder- theFunctionthat creates theHandlerEnhancerDefinitionbased on theConfiguration
-