SpringConfigurer
and SpringAxonConfiguration
.@Configuration(value="org.axonframework.spring.config.AxonConfiguration") @Deprecated public class AxonConfiguration extends Object implements Configuration, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware, org.springframework.context.SmartLifecycle
Constructor and Description |
---|
AxonConfiguration(Configurer configurer)
Deprecated.
Initializes a new
AxonConfiguration that uses the given configurer to build the configuration. |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet()
Deprecated.
|
CommandBus |
commandBus()
Deprecated.
Returns the Command Bus defined in this Configuration.
|
CommandGateway |
commandGateway(CommandBus commandBus)
Deprecated.
Returns the CommandGateway used to send commands to command handlers.
|
List<CorrelationDataProvider> |
correlationDataProviders()
Deprecated.
Returns the Correlation Data Providers defined in this Configuration.
|
CommandBus |
defaultCommandBus()
Deprecated.
|
EventBus |
defaultEventBus()
Deprecated.
|
QueryBus |
defaultQueryBus()
Deprecated.
|
QueryUpdateEmitter |
defaultQueryUpdateEmitter()
Deprecated.
|
EventBus |
eventBus()
Deprecated.
Retrieves the Event Bus defined in this Configuration.
|
EventProcessingConfiguration |
eventProcessingConfiguration()
Deprecated.
Returns the
EventProcessingConfiguration defined in this Configuration. |
Serializer |
eventSerializer()
Deprecated.
Returns the
Serializer defined in this Configuration to be used for serializing Event Message payload
and their metadata. |
<T> T |
getComponent(Class<T> componentType,
Supplier<T> defaultImpl)
Deprecated.
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()
Deprecated.
Returns all modules that have been registered with this Configuration.
|
int |
getPhase()
Deprecated.
|
HandlerDefinition |
handlerDefinition(Class<?> inspectedType)
Deprecated.
Returns the Handler Definition defined in this Configuration for the given
inspectedType . |
boolean |
isAutoStartup()
Deprecated.
|
boolean |
isRunning()
Deprecated.
|
<M extends Message<?>> |
messageMonitor(Class<?> componentType,
String componentName)
Deprecated.
Returns the message monitor configured for a component of given
componentType and componentName . |
Serializer |
messageSerializer()
Deprecated.
Returns the
Serializer defined in this Configuration to be used for serializing Message payloads and
metadata. |
void |
onShutdown(int phase,
LifecycleHandler shutdownHandler)
Deprecated.
Registers an asynchronous
shutdownHandler to be executed in the given phase when the
Configuration is shut down. |
void |
onStart(int phase,
LifecycleHandler startHandler)
Deprecated.
Registers an asynchronous
startHandler to be executed in the given phase when this Configuration
is started. |
QueryBus |
queryBus()
Deprecated.
|
QueryGateway |
queryGateway(QueryBus queryBus)
Deprecated.
|
QueryUpdateEmitter |
queryUpdateEmitter()
Deprecated.
Returns the Query Update Emitter in this Configuration.
|
<T> Repository<T> |
repository(Class<T> aggregateType)
Deprecated.
Returns the
Repository configured for the given aggregateType . |
ResourceInjector |
resourceInjector()
Deprecated.
Returns the ResourceInjector used to provide resources to Saga instances.
|
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
Deprecated.
|
void |
shutdown()
Deprecated.
Shuts down the components defined in this Configuration
|
void |
start()
Deprecated.
Starts this configuration.
|
void |
stop()
Deprecated.
|
void |
stop(Runnable callback)
Deprecated.
|
EventUpcasterChain |
upcasterChain()
Deprecated.
Returns the EventUpcasterChain with all registered upcasters.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
aggregateConfiguration, aggregateFactory, commandGateway, deadlineManager, eventGateway, eventScheduler, eventStore, findModules, getComponent, lifecycleRegistry, parameterResolverFactory, queryGateway, scopeAwareProvider, serializer, snapshotFilter, snapshotter, spanFactory, tags
onShutdown, onShutdown, onStart, onStart
public AxonConfiguration(Configurer configurer)
AxonConfiguration
that uses the given configurer
to build the configuration.configurer
- Configuration builder for the AxonConfiguration.public CommandBus commandBus()
Configuration
Configuration.start()
) before sending Commands over the Command Bus.commandBus
in interface Configuration
public QueryBus queryBus()
queryBus
in interface Configuration
public EventBus eventBus()
Configuration
eventBus
in interface Configuration
public QueryUpdateEmitter queryUpdateEmitter()
Configuration
Configuration.start()
before emitting updates over Query Update Emitter.queryUpdateEmitter
in interface Configuration
@Bean(value="queryBus") public QueryBus defaultQueryBus()
@Bean(value="queryUpdateEmitter") public QueryUpdateEmitter defaultQueryUpdateEmitter()
@Bean(value="commandBus") public CommandBus defaultCommandBus()
@Bean(value="eventBus") public EventBus defaultEventBus()
public ResourceInjector resourceInjector()
Configuration
resourceInjector
in interface Configuration
public EventProcessingConfiguration eventProcessingConfiguration()
Configuration
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 Configuration.getModules()
API should be used instead.eventProcessingConfiguration
in interface Configuration
EventProcessingConfiguration
defined in this Configuration@Bean public CommandGateway commandGateway(CommandBus commandBus)
commandBus
- the command bus to be used by the gateway@Bean public QueryGateway queryGateway(QueryBus queryBus)
public <T> Repository<T> repository(@Nonnull Class<T> aggregateType)
Configuration
Repository
configured for the given aggregateType
.repository
in interface Configuration
T
- the aggregate typeaggregateType
- the aggregate type to find the Repository
forRepository
from which aggregates of the given aggregateType
can be loadedpublic <T> T getComponent(@Nonnull Class<T> componentType, @Nonnull Supplier<T> defaultImpl)
Configuration
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.
getComponent
in interface Configuration
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 registeredpublic <M extends Message<?>> MessageMonitor<? super M> messageMonitor(@Nonnull Class<?> componentType, @Nonnull String componentName)
Configuration
componentType
and componentName
.messageMonitor
in interface Configuration
M
- The type of message the monitor can deal withcomponentType
- The type of component to return the monitor forcomponentName
- The name of the componentpublic Serializer eventSerializer()
Configuration
Serializer
defined in this Configuration to be used for serializing Event Message payload
and their metadata.eventSerializer
in interface Configuration
public Serializer messageSerializer()
Configuration
Serializer
defined in this Configuration to be used for serializing Message payloads and
metadata.messageSerializer
in interface Configuration
public List<CorrelationDataProvider> correlationDataProviders()
Configuration
correlationDataProviders
in interface Configuration
public HandlerDefinition handlerDefinition(Class<?> inspectedType)
Configuration
inspectedType
.handlerDefinition
in interface Configuration
inspectedType
- The class to being inspected for handlerspublic EventUpcasterChain upcasterChain()
Configuration
upcasterChain
in interface Configuration
public List<ModuleConfiguration> getModules()
Configuration
getModules
in interface Configuration
public void onStart(int phase, LifecycleHandler startHandler)
LifecycleOperations
startHandler
to be executed in the given phase
when this Configuration
is started.
The behavior for handlers that are registered when the Configuration is already started is undefined.
onStart
in interface LifecycleOperations
phase
- defines a phase
in which the start handler will be invoked during Configuration.start()
. When starting the configuration the given handlers are started in
ascending order based on their phase
startHandler
- the handler to be executed asynchronously when the configuration is startedConfiguration.start()
public void onShutdown(int phase, LifecycleHandler shutdownHandler)
LifecycleOperations
shutdownHandler
to be executed in the given phase
when the
Configuration is shut down.
The behavior for handlers that are registered when the Configuration is already shut down is undefined.
onShutdown
in interface LifecycleOperations
phase
- defines a phase in which the shutdown handler will be invoked during Configuration.shutdown()
. When shutting down the configuration the given handlers are
executing in descending order based on their phase
shutdownHandler
- the handler to be executed asynchronously when the Configuration is shut downConfiguration.shutdown()
public void start()
Configuration
start
in interface Configuration
start
in interface org.springframework.context.Lifecycle
public void shutdown()
Configuration
shutdown
in interface Configuration
public void stop()
stop
in interface org.springframework.context.Lifecycle
public boolean isRunning()
isRunning
in interface org.springframework.context.Lifecycle
public boolean isAutoStartup()
isAutoStartup
in interface org.springframework.context.SmartLifecycle
public void stop(Runnable callback)
stop
in interface org.springframework.context.SmartLifecycle
public int getPhase()
getPhase
in interface org.springframework.context.Phased
getPhase
in interface org.springframework.context.SmartLifecycle
public void afterPropertiesSet()
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
public void setApplicationContext(@Nonnull org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException
setApplicationContext
in interface org.springframework.context.ApplicationContextAware
org.springframework.beans.BeansException
Copyright © 2010–2024. All rights reserved.