Package org.axonframework.spring.config
Class AxonConfiguration
java.lang.Object
org.axonframework.spring.config.AxonConfiguration
- All Implemented Interfaces:
Configuration,LifecycleOperations,org.springframework.beans.factory.Aware,org.springframework.beans.factory.InitializingBean,org.springframework.context.ApplicationContextAware,org.springframework.context.Lifecycle,org.springframework.context.Phased,org.springframework.context.SmartLifecycle
@Configuration("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
Deprecated.
Spring Configuration class that defines a number of conditional beans. It also allows for access to components that
are available in the Configuration, but not made available as Spring beans by default.
- Since:
- 3.0
- Author:
- Allard Buijze
-
Field Summary
Fields inherited from interface org.springframework.context.SmartLifecycle
DEFAULT_PHASE -
Constructor Summary
ConstructorsConstructorDescriptionAxonConfiguration(Configurer configurer) Deprecated.Initializes a newAxonConfigurationthat uses the givenconfigurerto build the configuration. -
Method Summary
Modifier and TypeMethodDescriptionvoidDeprecated.Deprecated.Returns the Command Bus defined in this Configuration.commandGateway(CommandBus commandBus) Deprecated.Returns the CommandGateway used to send commands to command handlers.Deprecated.Returns the Correlation Data Providers defined in this Configuration.Deprecated.Deprecated.Deprecated.Deprecated.eventBus()Deprecated.Retrieves the Event Bus defined in this Configuration.Deprecated.Returns theEventProcessingConfigurationdefined in this Configuration.Deprecated.Returns theSerializerdefined in this Configuration to be used for serializing Event Message payload and their metadata.<T> TgetComponent(Class<T> componentType, Supplier<T> defaultImpl) Deprecated.Returns the Component declared under the givencomponentType, typically the interface the component implements, reverting to the givendefaultImplif no such component is defined.Deprecated.Returns all modules that have been registered with this Configuration.intgetPhase()Deprecated.handlerDefinition(Class<?> inspectedType) Deprecated.Returns the Handler Definition defined in this Configuration for the giveninspectedType.booleanDeprecated.booleanDeprecated.<M extends Message<?>>
MessageMonitor<? super M> messageMonitor(Class<?> componentType, String componentName) Deprecated.Returns the message monitor configured for a component of givencomponentTypeandcomponentName.Deprecated.Returns theSerializerdefined in this Configuration to be used for serializing Message payloads and metadata.voidonShutdown(int phase, LifecycleHandler shutdownHandler) Deprecated.Registers an asynchronousshutdownHandlerto be executed in the givenphasewhen the Configuration is shut down.voidonStart(int phase, LifecycleHandler startHandler) Deprecated.Registers an asynchronousstartHandlerto be executed in the givenphasewhen this Configuration is started.queryBus()Deprecated.queryGateway(QueryBus queryBus) Deprecated.Deprecated.Returns the Query Update Emitter in this Configuration.<T> Repository<T> repository(Class<T> aggregateType) Deprecated.Returns theRepositoryconfigured for the givenaggregateType.Deprecated.Returns the ResourceInjector used to provide resources to Saga instances.voidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext) Deprecated.voidshutdown()Deprecated.Shuts down the components defined in this Configurationvoidstart()Deprecated.Starts this configuration.voidstop()Deprecated.voidDeprecated.Deprecated.Returns the EventUpcasterChain with all registered upcasters.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.axonframework.config.Configuration
aggregateConfiguration, aggregateFactory, commandGateway, deadlineManager, eventGateway, eventScheduler, eventStore, findModules, getComponent, lifecycleRegistry, parameterResolverFactory, queryGateway, scopeAwareProvider, serializer, snapshotFilter, snapshotter, spanFactory, tagsMethods inherited from interface org.axonframework.config.LifecycleOperations
onShutdown, onShutdown, onStart, onStart
-
Constructor Details
-
AxonConfiguration
Deprecated.Initializes a newAxonConfigurationthat uses the givenconfigurerto build the configuration.- Parameters:
configurer- Configuration builder for the AxonConfiguration.
-
-
Method Details
-
commandBus
Deprecated.Description copied from interface:ConfigurationReturns the Command Bus defined in this Configuration. Note that this Configuration should be started (seeConfiguration.start()) before sending Commands over the Command Bus.- Specified by:
commandBusin interfaceConfiguration- Returns:
- the CommandBus defined in this configuration
-
queryBus
Deprecated.- Specified by:
queryBusin interfaceConfiguration
-
eventBus
Deprecated.Description copied from interface:ConfigurationRetrieves the Event Bus defined in this Configuration.- Specified by:
eventBusin interfaceConfiguration- Returns:
- the Event Bus defined in this Configuration
-
queryUpdateEmitter
Deprecated.Description copied from interface:ConfigurationReturns the Query Update Emitter in this Configuration. Note that this Configuration should be started (seeConfiguration.start()before emitting updates over Query Update Emitter.- Specified by:
queryUpdateEmitterin interfaceConfiguration- Returns:
- the QueryUpdateEmitter defined in this configuration
-
defaultQueryBus
Deprecated. -
defaultQueryUpdateEmitter
Deprecated. -
defaultCommandBus
Deprecated. -
defaultEventBus
Deprecated. -
resourceInjector
Deprecated.Description copied from interface:ConfigurationReturns the ResourceInjector used to provide resources to Saga instances.- Specified by:
resourceInjectorin interfaceConfiguration- Returns:
- the ResourceInjector used to provide resources to Saga instances
-
eventProcessingConfiguration
Deprecated.Description copied from interface:ConfigurationReturns theEventProcessingConfigurationdefined in this Configuration. If there aren't any defined,nullwill be returned. If there is exactly one, it will be returned. For case when there are multiple, anAxonConfigurationExceptionis thrown and theConfiguration.getModules()API should be used instead.- Specified by:
eventProcessingConfigurationin interfaceConfiguration- Returns:
- the
EventProcessingConfigurationdefined in this Configuration
-
commandGateway
Deprecated.Returns the CommandGateway used to send commands to command handlers.- Parameters:
commandBus- the command bus to be used by the gateway- Returns:
- the CommandGateway used to send commands to command handlers
-
queryGateway
Deprecated. -
repository
Deprecated.Description copied from interface:ConfigurationReturns theRepositoryconfigured for the givenaggregateType.- Specified by:
repositoryin interfaceConfiguration- Type Parameters:
T- the aggregate type- Parameters:
aggregateType- the aggregate type to find theRepositoryfor- Returns:
- the
Repositoryfrom which aggregates of the givenaggregateTypecan be loaded
-
getComponent
Deprecated.Description copied from interface:ConfigurationReturns the Component declared under the givencomponentType, typically the interface the component implements, reverting to the givendefaultImplif no such component is defined.When no component was previously registered, the default is then configured as the component for the given type.
- Specified by:
getComponentin interfaceConfiguration- Type Parameters:
T- The type of component- Parameters:
componentType- The type of componentdefaultImpl- The supplier of the default to return if no component was registered- Returns:
- the component registered for the given type, or the value returned by the
defaultImplsupplier, if no component was registered
-
messageMonitor
public <M extends Message<?>> MessageMonitor<? super M> messageMonitor(@Nonnull Class<?> componentType, @Nonnull String componentName) Deprecated.Description copied from interface:ConfigurationReturns the message monitor configured for a component of givencomponentTypeandcomponentName.- Specified by:
messageMonitorin interfaceConfiguration- Type Parameters:
M- The type of message the monitor can deal with- Parameters:
componentType- The type of component to return the monitor forcomponentName- The name of the component- Returns:
- The monitor to be used for the described component
-
eventSerializer
Deprecated.Description copied from interface:ConfigurationReturns theSerializerdefined in this Configuration to be used for serializing Event Message payload and their metadata.- Specified by:
eventSerializerin interfaceConfiguration- Returns:
- the event serializer defined in this Configuration.
-
messageSerializer
Deprecated.Description copied from interface:ConfigurationReturns theSerializerdefined in this Configuration to be used for serializing Message payloads and metadata.- Specified by:
messageSerializerin interfaceConfiguration- Returns:
- the message serializer defined in this Configuration.
-
correlationDataProviders
Deprecated.Description copied from interface:ConfigurationReturns the Correlation Data Providers defined in this Configuration.- Specified by:
correlationDataProvidersin interfaceConfiguration- Returns:
- the Correlation Data Providers defined in this Configuration
-
handlerDefinition
Deprecated.Description copied from interface:ConfigurationReturns the Handler Definition defined in this Configuration for the giveninspectedType.- Specified by:
handlerDefinitionin interfaceConfiguration- Parameters:
inspectedType- The class to being inspected for handlers- Returns:
- the Handler Definition defined in this Configuration
-
upcasterChain
Deprecated.Description copied from interface:ConfigurationReturns the EventUpcasterChain with all registered upcasters.- Specified by:
upcasterChainin interfaceConfiguration- Returns:
- the EventUpcasterChain with all registered upcasters
-
getModules
Deprecated.Description copied from interface:ConfigurationReturns all modules that have been registered with this Configuration.- Specified by:
getModulesin interfaceConfiguration- Returns:
- all modules that have been registered with this Configuration
-
onStart
Deprecated.Description copied from interface:LifecycleOperationsRegisters an asynchronousstartHandlerto be executed in the givenphasewhen this Configuration is started.The behavior for handlers that are registered when the Configuration is already started is undefined.
- Specified by:
onStartin interfaceLifecycleOperations- Parameters:
phase- defines aphasein which the start handler will be invoked duringConfiguration.start(). When starting the configuration the given handlers are started in ascending order based on theirphasestartHandler- the handler to be executed asynchronously when the configuration is started- See Also:
-
onShutdown
Deprecated.Description copied from interface:LifecycleOperationsRegisters an asynchronousshutdownHandlerto be executed in the givenphasewhen the Configuration is shut down.The behavior for handlers that are registered when the Configuration is already shut down is undefined.
- Specified by:
onShutdownin interfaceLifecycleOperations- Parameters:
phase- defines a phase in which the shutdown handler will be invoked duringConfiguration.shutdown(). When shutting down the configuration the given handlers are executing in descending order based on theirphaseshutdownHandler- the handler to be executed asynchronously when the Configuration is shut down- See Also:
-
start
public void start()Deprecated.Description copied from interface:ConfigurationStarts this configuration. All components defined in this Configuration will be started.- Specified by:
startin interfaceConfiguration- Specified by:
startin interfaceorg.springframework.context.Lifecycle
-
shutdown
public void shutdown()Deprecated.Description copied from interface:ConfigurationShuts down the components defined in this Configuration- Specified by:
shutdownin interfaceConfiguration
-
stop
public void stop()Deprecated.- Specified by:
stopin interfaceorg.springframework.context.Lifecycle
-
isRunning
public boolean isRunning()Deprecated.- Specified by:
isRunningin interfaceorg.springframework.context.Lifecycle
-
isAutoStartup
public boolean isAutoStartup()Deprecated.- Specified by:
isAutoStartupin interfaceorg.springframework.context.SmartLifecycle
-
stop
Deprecated.- Specified by:
stopin interfaceorg.springframework.context.SmartLifecycle
-
getPhase
public int getPhase()Deprecated.- Specified by:
getPhasein interfaceorg.springframework.context.Phased- Specified by:
getPhasein interfaceorg.springframework.context.SmartLifecycle
-
afterPropertiesSet
public void afterPropertiesSet()Deprecated.- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean
-
setApplicationContext
public void setApplicationContext(@Nonnull org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException Deprecated.- Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware- Throws:
org.springframework.beans.BeansException
-
SpringConfigurerandSpringAxonConfiguration.