Class BaseModule<S extends BaseModule<S>>
java.lang.Object
org.axonframework.common.configuration.BaseModule<S>
- Type Parameters:
S- The type extending this module, to support fluent interfaces.
- All Implemented Interfaces:
Module
- Direct Known Subclasses:
PooledStreamingEventProcessorModule,SubscribingEventProcessorModule
Base implementation for custom modules that contains the ComponentRegistry required to register components, enhancers
and (sub)modules.
- Since:
- 5.0.0
- Author:
- Allard Buijze
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBaseModule(String name) Construct a base module with the givenname. -
Method Summary
Modifier and TypeMethodDescriptionbuild(Configuration parent, LifecycleRegistry lifecycleRegistry) Buildsthis Module, resulting in theConfigurationcontaining all registered components.componentRegistry(Consumer<ComponentRegistry> registryAction) Executes the givenregistryActionon theComponentRegistryassociated with this module.name()The identifying name ofthis Module.protected ConfigurationpostProcessConfiguration(Configuration moduleConfiguration) Method that can be overridden to specify specific actions that need to be taken after the configuration for this module is constructed.
-
Field Details
-
name
-
-
Constructor Details
-
BaseModule
Construct a base module with the givenname.- Parameters:
name- The name of this module. Must not benull.
-
-
Method Details
-
name
Description copied from interface:ModuleThe identifying name ofthis Module. -
build
public Configuration build(@Nonnull Configuration parent, @Nonnull LifecycleRegistry lifecycleRegistry) Description copied from interface:ModuleBuildsthis Module, resulting in theConfigurationcontaining all registered components.The given
parentallows access to components that have been registered with it. Note that this operation is typically invoked throughApplicationConfigurer.build()and as such should not be invoked directly.- Specified by:
buildin interfaceModule- Parameters:
parent- The parentConfigurationthis Modulebelongs in, giving it access to the parent's components.lifecycleRegistry- The registry where lifecycle handlers can be registered by this module.- Returns:
- The fully initialized
Configurationinstance fromthis Modulespecifically.
-
postProcessConfiguration
Method that can be overridden to specify specific actions that need to be taken after the configuration for this module is constructed.The default implementation returns the configuration unchanged.
- Parameters:
moduleConfiguration- The configuration for this module.
-
componentRegistry
Executes the givenregistryActionon theComponentRegistryassociated with this module.- Parameters:
registryAction- The action to perform on the component registry.- Returns:
- This instance for fluent interfacing.
-