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
  • Constructor Details

    • AxonConfiguration

      public AxonConfiguration(Configurer configurer)
      Deprecated.
      Initializes a new AxonConfiguration that uses the given configurer to build the configuration.
      Parameters:
      configurer - Configuration builder for the AxonConfiguration.
  • Method Details

    • commandBus

      public CommandBus commandBus()
      Deprecated.
      Description copied from interface: Configuration
      Returns the Command Bus defined in this Configuration. Note that this Configuration should be started (see Configuration.start()) before sending Commands over the Command Bus.
      Specified by:
      commandBus in interface Configuration
      Returns:
      the CommandBus defined in this configuration
    • queryBus

      public QueryBus queryBus()
      Deprecated.
      Specified by:
      queryBus in interface Configuration
    • eventBus

      public EventBus eventBus()
      Deprecated.
      Description copied from interface: Configuration
      Retrieves the Event Bus defined in this Configuration.
      Specified by:
      eventBus in interface Configuration
      Returns:
      the Event Bus defined in this Configuration
    • queryUpdateEmitter

      public QueryUpdateEmitter queryUpdateEmitter()
      Deprecated.
      Description copied from interface: Configuration
      Returns the Query Update Emitter in this Configuration. Note that this Configuration should be started (see Configuration.start() before emitting updates over Query Update Emitter.
      Specified by:
      queryUpdateEmitter in interface Configuration
      Returns:
      the QueryUpdateEmitter defined in this configuration
    • defaultQueryBus

      @Bean("queryBus") public QueryBus defaultQueryBus()
      Deprecated.
    • defaultQueryUpdateEmitter

      @Bean("queryUpdateEmitter") public QueryUpdateEmitter defaultQueryUpdateEmitter()
      Deprecated.
    • defaultCommandBus

      @Bean("commandBus") public CommandBus defaultCommandBus()
      Deprecated.
    • defaultEventBus

      @Bean("eventBus") public EventBus defaultEventBus()
      Deprecated.
    • resourceInjector

      public ResourceInjector resourceInjector()
      Deprecated.
      Description copied from interface: Configuration
      Returns the ResourceInjector used to provide resources to Saga instances.
      Specified by:
      resourceInjector in interface Configuration
      Returns:
      the ResourceInjector used to provide resources to Saga instances
    • eventProcessingConfiguration

      public EventProcessingConfiguration eventProcessingConfiguration()
      Deprecated.
      Description copied from interface: Configuration
      Returns the 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.
      Specified by:
      eventProcessingConfiguration in interface Configuration
      Returns:
      the EventProcessingConfiguration defined in this Configuration
    • commandGateway

      @Bean public CommandGateway commandGateway(CommandBus commandBus)
      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

      @Bean public QueryGateway queryGateway(QueryBus queryBus)
      Deprecated.
    • repository

      public <T> Repository<T> repository(@Nonnull Class<T> aggregateType)
      Deprecated.
      Description copied from interface: Configuration
      Returns the Repository configured for the given aggregateType.
      Specified by:
      repository in interface Configuration
      Type Parameters:
      T - the aggregate type
      Parameters:
      aggregateType - the aggregate type to find the Repository for
      Returns:
      the Repository from which aggregates of the given aggregateType can be loaded
    • getComponent

      public <T> T getComponent(@Nonnull Class<T> componentType, @Nonnull Supplier<T> defaultImpl)
      Deprecated.
      Description copied from interface: Configuration
      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.

      When no component was previously registered, the default is then configured as the component for the given type.

      Specified by:
      getComponent in interface Configuration
      Type Parameters:
      T - The type of component
      Parameters:
      componentType - The type of component
      defaultImpl - 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 defaultImpl supplier, 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: Configuration
      Returns the message monitor configured for a component of given componentType and componentName.
      Specified by:
      messageMonitor in interface Configuration
      Type Parameters:
      M - The type of message the monitor can deal with
      Parameters:
      componentType - The type of component to return the monitor for
      componentName - The name of the component
      Returns:
      The monitor to be used for the described component
    • eventSerializer

      public Serializer eventSerializer()
      Deprecated.
      Description copied from interface: Configuration
      Returns the Serializer defined in this Configuration to be used for serializing Event Message payload and their metadata.
      Specified by:
      eventSerializer in interface Configuration
      Returns:
      the event serializer defined in this Configuration.
    • messageSerializer

      public Serializer messageSerializer()
      Deprecated.
      Description copied from interface: Configuration
      Returns the Serializer defined in this Configuration to be used for serializing Message payloads and metadata.
      Specified by:
      messageSerializer in interface Configuration
      Returns:
      the message serializer defined in this Configuration.
    • correlationDataProviders

      public List<CorrelationDataProvider> correlationDataProviders()
      Deprecated.
      Description copied from interface: Configuration
      Returns the Correlation Data Providers defined in this Configuration.
      Specified by:
      correlationDataProviders in interface Configuration
      Returns:
      the Correlation Data Providers defined in this Configuration
    • handlerDefinition

      public HandlerDefinition handlerDefinition(Class<?> inspectedType)
      Deprecated.
      Description copied from interface: Configuration
      Returns the Handler Definition defined in this Configuration for the given inspectedType.
      Specified by:
      handlerDefinition in interface Configuration
      Parameters:
      inspectedType - The class to being inspected for handlers
      Returns:
      the Handler Definition defined in this Configuration
    • upcasterChain

      public EventUpcasterChain upcasterChain()
      Deprecated.
      Description copied from interface: Configuration
      Returns the EventUpcasterChain with all registered upcasters.
      Specified by:
      upcasterChain in interface Configuration
      Returns:
      the EventUpcasterChain with all registered upcasters
    • getModules

      public List<ModuleConfiguration> getModules()
      Deprecated.
      Description copied from interface: Configuration
      Returns all modules that have been registered with this Configuration.
      Specified by:
      getModules in interface Configuration
      Returns:
      all modules that have been registered with this Configuration
    • onStart

      public void onStart(int phase, LifecycleHandler startHandler)
      Deprecated.
      Description copied from interface: LifecycleOperations
      Registers an asynchronous 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.

      Specified by:
      onStart in interface LifecycleOperations
      Parameters:
      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 started
      See Also:
    • onShutdown

      public void onShutdown(int phase, LifecycleHandler shutdownHandler)
      Deprecated.
      Description copied from interface: LifecycleOperations
      Registers an asynchronous 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.

      Specified by:
      onShutdown in interface LifecycleOperations
      Parameters:
      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 down
      See Also:
    • start

      public void start()
      Deprecated.
      Description copied from interface: Configuration
      Starts this configuration. All components defined in this Configuration will be started.
      Specified by:
      start in interface Configuration
      Specified by:
      start in interface org.springframework.context.Lifecycle
    • shutdown

      public void shutdown()
      Deprecated.
      Description copied from interface: Configuration
      Shuts down the components defined in this Configuration
      Specified by:
      shutdown in interface Configuration
    • stop

      public void stop()
      Deprecated.
      Specified by:
      stop in interface org.springframework.context.Lifecycle
    • isRunning

      public boolean isRunning()
      Deprecated.
      Specified by:
      isRunning in interface org.springframework.context.Lifecycle
    • isAutoStartup

      public boolean isAutoStartup()
      Deprecated.
      Specified by:
      isAutoStartup in interface org.springframework.context.SmartLifecycle
    • stop

      public void stop(Runnable callback)
      Deprecated.
      Specified by:
      stop in interface org.springframework.context.SmartLifecycle
    • getPhase

      public int getPhase()
      Deprecated.
      Specified by:
      getPhase in interface org.springframework.context.Phased
      Specified by:
      getPhase in interface org.springframework.context.SmartLifecycle
    • afterPropertiesSet

      public void afterPropertiesSet()
      Deprecated.
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
    • setApplicationContext

      public void setApplicationContext(@Nonnull org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException
      Deprecated.
      Specified by:
      setApplicationContext in interface org.springframework.context.ApplicationContextAware
      Throws:
      org.springframework.beans.BeansException