Interface ConfigurationEnhancer
- All Known Implementing Classes:
AxonServerConfigurationEnhancer,ClasspathParameterResolverConfigurationEnhancer,CommandDispatcherParameterResolverFactoryConfigurationEnhancer,ConfigurationParameterResolverConfigurationEnhancer,DistributedCommandBusConfigurationEnhancer,DistributedQueryBusConfigurationEnhancer,EventAppenderParameterResolverFactoryConfigurationEnhancer,EventBusConfigurationDefaults,EventSourcingConfigurationDefaults,HierarchicalParameterResolverFactoryConfigurationEnhancer,HierarchicalStateManagerConfigurationEnhancer,InjectEntityParameterResolverFactoryConfigurationEnhancer,JpaEventStoreAutoConfiguration.AggregateBasedJpaEventStorageEngineConfigurationEnhancer,MessageHandlerConfigurer,MessagesRecordingConfigurationEnhancer,MessagingConfigurationDefaults,MetricsConfigurerModule,MetricsConfigurerModule,ModellingConfigurationDefaults,SpringEventSourcedEntityConfigurer,UpdateCheckerConfigurationEnhancer
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
ComponentRegistry from the Axon Framework configuration API,
taking effect during build of the configurer.
Through implementing the enhance(ComponentRegistry) operation a ConfigurationEnhancer is able to,
for example, register components and
register decorators. The registration of
components and/or decorators can be made conditional by using the ComponentRegistry.hasComponent(Class)
operation.
If the components and/or decorators the enhancers includes have start-up or shutdown handlers, consider using the
component definition and
decorator definition registration methods. Both
these operations inspect a definition to be given, for which the builder flow includes defining start-up and shutdown
handlers.
Note that enhancers have an order() in which they enhance the Configurer. When not otherwise
specified, the order defaults to 0. Thus, without specifying the order, the insert order of enhancer dictates
the order.
- Since:
- 3.2.0
- Author:
- Steven van Beelen
-
Method Summary
Modifier and TypeMethodDescriptionvoidenhance(ComponentRegistry registry) default intorder()Returns the relative order this enhancer should be invoked in, compared to other instances.
-
Method Details
-
enhance
- Parameters:
registry- The registry instance to enhance.
-
order
default int order()Returns the relative order this enhancer should be invoked in, compared to other instances.Use lower (negative) values for enhancers providing sensible defaults, and higher values for enhancers that should be able to override values potentially previously set. Defaults to
0when not set.- Returns:
- The order in which this enhancer should be invoked.
-