public interface Configuration extends LifecycleOperations
Note that certain components in the Configuration may need to be started. Therefore, before using any of the
components provided by this configuration, ensure that start() has been invoked.
| Modifier and Type | Method and Description |
|---|---|
default <A> AggregateConfiguration<A> |
aggregateConfiguration(Class<A> aggregateType)
Returns the
AggregateConfiguration for the given aggregateType. |
default <A> org.axonframework.eventsourcing.AggregateFactory<A> |
aggregateFactory(Class<A> aggregateType)
Returns the
AggregateFactory configured for the given aggregateType. |
default org.axonframework.commandhandling.CommandBus |
commandBus()
Returns the Command Bus defined in this Configuration.
|
default org.axonframework.commandhandling.gateway.CommandGateway |
commandGateway()
Returns the Command Gateway defined in this Configuration.
|
List<org.axonframework.messaging.correlation.CorrelationDataProvider> |
correlationDataProviders()
Returns the Correlation Data Providers defined in this Configuration.
|
default org.axonframework.deadline.DeadlineManager |
deadlineManager()
Returns the
DeadlineManager defined in this Configuration. |
default org.axonframework.eventhandling.EventBus |
eventBus()
Retrieves the Event Bus defined in this Configuration.
|
default org.axonframework.eventhandling.gateway.EventGateway |
eventGateway()
Returns the Event Gateway defined in this Configuration.
|
default EventProcessingConfiguration |
eventProcessingConfiguration()
Returns the
EventProcessingConfiguration defined in this Configuration. |
default org.axonframework.eventhandling.scheduling.EventScheduler |
eventScheduler()
Returns the
EventScheduler defined in this Configuration. |
org.axonframework.serialization.Serializer |
eventSerializer()
Returns the
Serializer defined in this Configuration to be used for serializing Event Message payload
and their metadata. |
default org.axonframework.eventsourcing.eventstore.EventStore |
eventStore()
Returns the Event Store in this Configuration, if it is defined.
|
default <T extends ModuleConfiguration> |
findModules(Class<T> moduleType)
Finds all configuration modules of given
moduleType within this configuration. |
default <T> T |
getComponent(Class<T> componentType)
Returns the Component declared under the given
componentType, typically the interface the component
implements. |
<T> T |
getComponent(Class<T> componentType,
Supplier<T> defaultImpl)
Returns the Component declared under the given
componentType, typically the interface the component
implements, reverting to the given defaultImpl if no such component is defined. |
List<ModuleConfiguration> |
getModules()
Returns all modules that have been registered with this Configuration.
|
org.axonframework.messaging.annotation.HandlerDefinition |
handlerDefinition(Class<?> inspectedType)
Returns the Handler Definition defined in this Configuration for the given
inspectedType. |
default org.axonframework.lifecycle.Lifecycle.LifecycleRegistry |
lifecycleRegistry()
Returns the lifecycle registry for this configuration.
|
<M extends org.axonframework.messaging.Message<?>> |
messageMonitor(Class<?> componentType,
String componentName)
Returns the message monitor configured for a component of given
componentType and componentName. |
org.axonframework.serialization.Serializer |
messageSerializer()
Returns the
Serializer defined in this Configuration to be used for serializing Message payloads and
metadata. |
default org.axonframework.messaging.annotation.ParameterResolverFactory |
parameterResolverFactory()
Returns the Parameter Resolver Factory defined in this Configuration
|
default org.axonframework.queryhandling.QueryBus |
queryBus() |
default org.axonframework.queryhandling.QueryGateway |
queryGateway()
Returns the Query Gateway defined in this Configuration.
|
default org.axonframework.queryhandling.QueryUpdateEmitter |
queryUpdateEmitter()
Returns the Query Update Emitter in this Configuration.
|
default <A> org.axonframework.modelling.command.Repository<A> |
repository(Class<A> aggregateType)
Returns the
Repository configured for the given aggregateType. |
default org.axonframework.modelling.saga.ResourceInjector |
resourceInjector()
Returns the ResourceInjector used to provide resources to Saga instances.
|
default org.axonframework.messaging.ScopeAwareProvider |
scopeAwareProvider()
Returns the
ScopeAwareProvider defined in the Configuration. |
default org.axonframework.serialization.Serializer |
serializer()
Returns the serializer defined in this Configuration
|
void |
shutdown()
Shuts down the components defined in this Configuration
|
default org.axonframework.eventsourcing.snapshotting.SnapshotFilter |
snapshotFilter()
Returns the
SnapshotFilter combining all defined filters per AggregateConfigurer in an SnapshotFilter.combine(SnapshotFilter) operation. |
default org.axonframework.eventsourcing.Snapshotter |
snapshotter()
Returns the
Snapshotter defined in this Configuration. |
default org.axonframework.tracing.SpanFactory |
spanFactory()
Returns the
SpanFactory defined in this configuration. |
void |
start()
Starts this configuration.
|
default TagsConfiguration |
tags()
Returns the Tags Configuration defined in this Configuration.
|
org.axonframework.serialization.upcasting.event.EventUpcasterChain |
upcasterChain()
Returns the EventUpcasterChain with all registered upcasters.
|
onShutdown, onShutdown, onShutdown, onStart, onStart, onStartdefault org.axonframework.eventhandling.EventBus eventBus()
default org.axonframework.lifecycle.Lifecycle.LifecycleRegistry lifecycleRegistry()
default org.axonframework.eventsourcing.eventstore.EventStore eventStore()
AxonConfigurationException.default <T extends ModuleConfiguration> List<T> findModules(@Nonnull Class<T> moduleType)
moduleType within this configuration.T - The type of the configuration modulemoduleType - The type of the configuration modulemoduleType defined in this configurationdefault org.axonframework.commandhandling.CommandBus commandBus()
start()) before sending Commands over the Command Bus.default org.axonframework.queryhandling.QueryBus queryBus()
default org.axonframework.queryhandling.QueryUpdateEmitter queryUpdateEmitter()
start() before emitting updates over Query Update Emitter.default org.axonframework.modelling.saga.ResourceInjector resourceInjector()
default org.axonframework.commandhandling.gateway.CommandGateway commandGateway()
start()) before sending Commands using this Command Gateway.default EventProcessingConfiguration eventProcessingConfiguration() throws org.axonframework.common.AxonConfigurationException
EventProcessingConfiguration defined in this Configuration. If there aren't any defined,
null will be returned. If there is exactly one, it will be returned. For case when there are multiple,
an AxonConfigurationException is thrown and the getModules() API should be used instead.EventProcessingConfiguration defined in this Configurationorg.axonframework.common.AxonConfigurationException - thrown if there are more than one Event Processing Configurations defined with
this configurationdefault org.axonframework.queryhandling.QueryGateway queryGateway()
start()) before sending Queries using this Query Gateway.default org.axonframework.eventhandling.gateway.EventGateway eventGateway()
default TagsConfiguration tags()
default org.axonframework.tracing.SpanFactory spanFactory()
SpanFactory defined in this configuration.SpanFactory defined in this configuration.default <A> AggregateConfiguration<A> aggregateConfiguration(@Nonnull Class<A> aggregateType)
AggregateConfiguration for the given aggregateType.A - the aggregate typeaggregateType - the aggregate type to find the AggregateConfiguration forAggregateConfiguration for the given aggregateTypedefault <A> org.axonframework.modelling.command.Repository<A> repository(@Nonnull Class<A> aggregateType)
Repository configured for the given aggregateType.A - the aggregate typeaggregateType - the aggregate type to find the Repository forRepository from which aggregates of the given aggregateType can be loadeddefault <A> org.axonframework.eventsourcing.AggregateFactory<A> aggregateFactory(@Nonnull Class<A> aggregateType)
AggregateFactory configured for the given aggregateType.A - the aggregate typeaggregateType - the aggregate type to find the AggregateFactory forAggregateFactory which constructs aggregate of the given aggregateTypedefault <T> T getComponent(@Nonnull Class<T> componentType)
componentType, typically the interface the component
implements.T - The type of componentcomponentType - The type of componentnull if no such component exists<T> T getComponent(@Nonnull Class<T> componentType, @Nonnull Supplier<T> defaultImpl)
componentType, typically the interface the component
implements, reverting to the given defaultImpl if no such component is defined.
When no component was previously registered, the default is then configured as the component for the given type.
T - The type of componentcomponentType - The type of componentdefaultImpl - The supplier of the default to return if no component was registereddefaultImpl supplier,
if no component was registered<M extends org.axonframework.messaging.Message<?>> org.axonframework.monitoring.MessageMonitor<? super M> messageMonitor(@Nonnull Class<?> componentType, @Nonnull String componentName)
componentType and componentName.M - The type of message the monitor can deal withcomponentType - The type of component to return the monitor forcomponentName - The name of the componentdefault org.axonframework.serialization.Serializer serializer()
org.axonframework.serialization.Serializer eventSerializer()
Serializer defined in this Configuration to be used for serializing Event Message payload
and their metadata.org.axonframework.serialization.Serializer messageSerializer()
Serializer defined in this Configuration to be used for serializing Message payloads and
metadata.void start()
void shutdown()
List<org.axonframework.messaging.correlation.CorrelationDataProvider> correlationDataProviders()
default org.axonframework.messaging.annotation.ParameterResolverFactory parameterResolverFactory()
org.axonframework.messaging.annotation.HandlerDefinition handlerDefinition(Class<?> inspectedType)
inspectedType.inspectedType - The class to being inspected for handlersdefault org.axonframework.eventhandling.scheduling.EventScheduler eventScheduler()
EventScheduler defined in this Configuration.EventScheduler defined in this Configurationdefault org.axonframework.deadline.DeadlineManager deadlineManager()
DeadlineManager defined in this Configuration.DeadlineManager defined in this Configurationdefault org.axonframework.eventsourcing.Snapshotter snapshotter()
Snapshotter defined in this Configuration.Snapshotter defined in this Configurationdefault org.axonframework.messaging.ScopeAwareProvider scopeAwareProvider()
ScopeAwareProvider defined in the Configuration.ScopeAwareProvider defined in the ConfigurationList<ModuleConfiguration> getModules()
org.axonframework.serialization.upcasting.event.EventUpcasterChain upcasterChain()
default org.axonframework.eventsourcing.snapshotting.SnapshotFilter snapshotFilter()
SnapshotFilter combining all defined filters per AggregateConfigurer in an SnapshotFilter.combine(SnapshotFilter) operation.SnapshotFilter combining all defined filters per AggregateConfigurerCopyright © 2010–2023. All rights reserved.