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 Details

    • componentRegistry

      ApplicationConfigurer componentRegistry(@Nonnull Consumer<ComponentRegistry> componentRegistrar)
      Executes the given componentRegistrar on the component registry associated with this ApplicationConfigurer.
      Parameters:
      componentRegistrar - The actions to take on the component registry.
      Returns:
      This ApplicationConfigurer for a fluent API.
    • lifecycleRegistry

      ApplicationConfigurer lifecycleRegistry(@Nonnull Consumer<LifecycleRegistry> lifecycleRegistrar)
      Executes the given lifecycleRegistrar on the lifecycle registry associated with this ApplicationConfigurer.
      Parameters:
      lifecycleRegistrar - The actions to take on the lifecycle registry.
      Returns:
      This ApplicationConfigurer for a fluent API.
    • build

      Returns the completely initialized Configuration instance of type C built using this Configurer implementation.

      It is not recommended to change any configuration on this ApplicationConfigurer once this method is called.

      Returns:
      The fully initialized Configuration instance of type C.
    • start

      default AxonConfiguration start()
      Builds the configuration and starts it immediately, by invoking AxonConfiguration.start().

      It is not recommended to change any configuration on this ApplicationConfigurer once this method is called.

      Returns:
      The fully initialized and started AxonConfiguration.