Interface ApplicationConfigurer
- All Known Implementing Classes:
DefaultAxonApplication,EventSourcingConfigurer,MessagingConfigurer,ModellingConfigurer,SpringAxonApplication
public interface ApplicationConfigurer
An
ApplicationConfigurer combines the component registry with the notion of lifecycle. When started,
lifecycle handlers are invoked in the order specified during registration.
Building it exposes the AxonConfiguration, which can be started and
stopped. Furthermore, there's a convenience start() operation on this
interface, which invokes build() and AxonConfiguration#start() in one go.
- Since:
- 5.0.0
- Author:
- Allard Buijze, Steven van Beelen
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Returns the completely initializedConfigurationinstance of typeCbuilt using thisConfigurerimplementation.componentRegistry(Consumer<ComponentRegistry> componentRegistrar) Executes the givencomponentRegistraron the component registry associated with thisApplicationConfigurer.lifecycleRegistry(Consumer<LifecycleRegistry> lifecycleRegistrar) Executes the givenlifecycleRegistraron the lifecycle registry associated with thisApplicationConfigurer.default AxonConfigurationstart()Builds the configurationand starts it immediately, by invokingAxonConfiguration.start().
-
Method Details
-
componentRegistry
Executes the givencomponentRegistraron the component registry associated with thisApplicationConfigurer.- Parameters:
componentRegistrar- The actions to take on the component registry.- Returns:
- This
ApplicationConfigurerfor a fluent API.
-
lifecycleRegistry
Executes the givenlifecycleRegistraron the lifecycle registry associated with thisApplicationConfigurer.- Parameters:
lifecycleRegistrar- The actions to take on the lifecycle registry.- Returns:
- This
ApplicationConfigurerfor a fluent API.
-
build
AxonConfiguration build()Returns the completely initializedConfigurationinstance of typeCbuilt using thisConfigurerimplementation.It is not recommended to change any configuration on
this ApplicationConfigureronce this method is called.- Returns:
- The fully initialized
Configurationinstance of typeC.
-
start
Builds the configurationand starts it immediately, by invokingAxonConfiguration.start().It is not recommended to change any configuration on
this ApplicationConfigureronce this method is called.- Returns:
- The fully initialized and started
AxonConfiguration.
-