Package org.axonframework.config
Interface ModuleConfiguration
- All Known Subinterfaces:
AggregateConfiguration<A>
- All Known Implementing Classes:
AggregateConfigurer,AxonIQConsoleModule,EventProcessingModule,EventProcessorInfoConfiguration,HeartbeatConfiguration
public interface ModuleConfiguration
Interface describing a module for the Axon Configuration API. These modules are relatively independent, but have
access to the component available in the main Configuration.
Modules have callback methods for the initialization, start and shutdown phases of the application's lifecycle.
- Since:
- 3.0
- Author:
- Allard Buijze
-
Method Summary
Modifier and TypeMethodDescriptionvoidinitialize(Configuration config) Initialize the module configuration using the given globalconfig.default booleanChecks whether this Module Configuration is of the giventype.default intphase()Deprecated.default voidshutdown()Deprecated.in favor of maintaining shutdown operations in theComponent.default voidstart()Deprecated.in favor of maintaining start operations in theComponent.default ModuleConfigurationunwrap()Returns the actual module configuration instance.
-
Method Details
-
initialize
Initialize the module configuration using the given globalconfig. Any specific start up or shut down processes should be added here by using the providedconfigand invokeLifecycleOperations.onStart(int, LifecycleHandler)andLifecycleOperations.onShutdown(int, LifecycleHandler)respectively.- Parameters:
config- the global configuration, providing access to generic components
-
phase
Deprecated.aModuleConfiguration's phase is no longer used, as distinct phases might be necessary for any of the start or shutdown processes added in theinitialize(Configuration)methodDefines a phase in which this module'sinitialize(Configuration),start(),shutdown()will be invoked.- Returns:
- this module's phase
-
start
Deprecated.in favor of maintaining start operations in theComponent. Any lifecycle operations not covered through the components created by thisModuleConfigurationshould be added to theConfigurationininitialize(Configuration)throughLifecycleOperations.onStart(int, LifecycleHandler)Invoked when the Configuration is started.- See Also:
-
shutdown
Deprecated.in favor of maintaining shutdown operations in theComponent. Any lifecycle operations not covered through the components created by thisModuleConfigurationshould be added to theConfigurationininitialize(Configuration)throughLifecycleOperations.onShutdown(int, LifecycleHandler)Invoked prior to shutdown of the application.- See Also:
-
unwrap
Returns the actual module configuration instance. Usually, it is the instance itself. However, in case of module configuration wrappers, we would like to provide the wrapped module configuration as the instance.- Returns:
- the actual module configuration instance
-
isType
Checks whether this Module Configuration is of the giventype.- Parameters:
type- aClasstype to check the Module Configuration against- Returns:
- whether Module Configuration is of given
type
-
ModuleConfiguration's phase is no longer used, as distinct phases might be necessary for any of the start or shutdown processes added in theinitialize(Configuration)method