Class DefaultEventHandlingComponentsConfigurer
java.lang.Object
org.axonframework.messaging.eventhandling.configuration.DefaultEventHandlingComponentsConfigurer
- All Implemented Interfaces:
EventHandlingComponentsConfigurer.AdditionalComponentPhase,EventHandlingComponentsConfigurer.CompletePhase,EventHandlingComponentsConfigurer.ComponentsPhase,EventHandlingComponentsConfigurer.RequiredComponentPhase
@Internal
public class DefaultEventHandlingComponentsConfigurer
extends Object
implements EventHandlingComponentsConfigurer.RequiredComponentPhase, EventHandlingComponentsConfigurer.AdditionalComponentPhase
Default implementation of
EventHandlingComponentsConfigurer providing EventHandlingComponents`
builders management with decoration support.- Since:
- 5.0.0
- Author:
- Mateusz Nowak
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new empty configurer instance. -
Method Summary
Modifier and TypeMethodDescriptiondeclarative(String componentName, ComponentBuilder<EventHandlingComponent> handlingComponentBuilder) Configures a single event handling component.declarative(ComponentBuilder<EventHandlingComponent> handlingComponentBuilder) Deprecated, for removal: This API element is subject to removal in a future version.Applies a decorator to all components in the collection.intercepted(ComponentBuilder<MessageHandlerInterceptor<? super EventMessage>> interceptorBuilder) Registers an interceptor to be applied to all event handling components in this configurer.toMap()Returns the configured map of event handling components.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.axonframework.messaging.eventhandling.configuration.EventHandlingComponentsConfigurer.CompletePhase
withExceptionHandlerMethods inherited from interface org.axonframework.messaging.eventhandling.configuration.EventHandlingComponentsConfigurer.ComponentsPhase
autodetected, autodetected
-
Constructor Details
-
DefaultEventHandlingComponentsConfigurer
public DefaultEventHandlingComponentsConfigurer()Creates a new empty configurer instance.
-
-
Method Details
-
declarative
@Deprecated(forRemoval=true) public EventHandlingComponentsConfigurer.AdditionalComponentPhase declarative(ComponentBuilder<EventHandlingComponent> handlingComponentBuilder) Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:EventHandlingComponentsConfigurer.ComponentsPhaseConfigures a single event handling component with an auto-generated index-based name.- Specified by:
declarativein interfaceEventHandlingComponentsConfigurer.ComponentsPhase- Parameters:
handlingComponentBuilder- The component to configure.- Returns:
- The complete phase for decoration and finalization.
-
declarative
public EventHandlingComponentsConfigurer.AdditionalComponentPhase declarative(String componentName, ComponentBuilder<EventHandlingComponent> handlingComponentBuilder) Description copied from interface:EventHandlingComponentsConfigurer.ComponentsPhaseConfigures a single event handling component.- Specified by:
declarativein interfaceEventHandlingComponentsConfigurer.ComponentsPhase- Parameters:
componentName- The unique component name.handlingComponentBuilder- The component to configure.- Returns:
- The complete phase for decoration and finalization.
-
intercepted
public EventHandlingComponentsConfigurer.CompletePhase intercepted(ComponentBuilder<MessageHandlerInterceptor<? super EventMessage>> interceptorBuilder) Description copied from interface:EventHandlingComponentsConfigurer.CompletePhaseRegisters an interceptor to be applied to all event handling components in this configurer. Multiple calls accumulate interceptors in registration order. The builder may access theConfigurationand register lifecycle handlers.Calling this method closes the component registration phase — no further components can be added after this call.
- Specified by:
interceptedin interfaceEventHandlingComponentsConfigurer.CompletePhase- Parameters:
interceptorBuilder- builder for the interceptor to apply- Returns:
- this phase for further interceptor or decorator registration
-
decorated
public EventHandlingComponentsConfigurer.CompletePhase decorated(BiFunction<Configuration, EventHandlingComponent, EventHandlingComponent> decorator) Description copied from interface:EventHandlingComponentsConfigurer.CompletePhaseApplies a decorator to all components in the collection.- Specified by:
decoratedin interfaceEventHandlingComponentsConfigurer.CompletePhase- Parameters:
decorator- Function to decorate each component.- Returns:
- This phase for further decoration or finalization.
-
toMap
Description copied from interface:EventHandlingComponentsConfigurer.CompletePhaseReturns the configured map of event handling components.- Specified by:
toMapin interfaceEventHandlingComponentsConfigurer.CompletePhase- Returns:
- The immutable map of configured component names to builders.
-