Class DefaultConfigurer

java.lang.Object
org.axonframework.config.DefaultConfigurer
All Implemented Interfaces:
Configurer, LifecycleOperations
Direct Known Subclasses:
SpringConfigurer

public class DefaultConfigurer extends Object implements Configurer
Entry point of the Axon Configuration API. It implements the Configurer interface, providing access to the methods to configure the default Axon components.

Using defaultConfiguration(), you will get a Configurer instance with default components configured. You will need to register your Aggregates (using configureAggregate(AggregateConfiguration) and provide a repository implementation for each of them, or if you wish to use event sourcing, register your aggregates through Configurer.configureAggregate(Class) and configure an Event Store (Configurer.configureEventStore(Function) or configureEmbeddedEventStore(Function)).

Use buildConfiguration() to build the configuration, which provides access to the configured building blocks, such as the CommandBus and EventBus.

Note that this Configurer implementation is not thread-safe.

Since:
3.0
Author:
Allard Buijze
  • Constructor Details

    • DefaultConfigurer

      protected DefaultConfigurer()
      Initialize the Configurer.
  • Method Details

    • defaultConfiguration

      public static Configurer defaultConfiguration()
      Returns a Configurer instance with default components configured, such as a SimpleCommandBus and SimpleEventBus.
      Returns:
      Configurer instance for further configuration.
    • defaultConfiguration

      public static Configurer defaultConfiguration(boolean autoLocateConfigurerModules)
      Returns a Configurer instance with default components configured, such as a SimpleCommandBus and SimpleEventBus, indicating whether to autoLocateConfigurerModules.

      When autoLocateConfigurerModules is true, a ServiceLoader will be used to locate all declared instances of type ConfigurerModule. Each of the discovered instances will be invoked, allowing it to set default values for the configuration.

      Parameters:
      autoLocateConfigurerModules - flag indicating whether ConfigurerModules on the classpath should be automatically retrieved. Should be set to false when using an application container, such as Spring or CDI.
      Returns:
      Configurer instance for further configuration.
    • jpaConfiguration

      public static Configurer jpaConfiguration(EntityManagerProvider entityManagerProvider, TransactionManager transactionManager)
      Returns a Configurer instance which has JPA versions of building blocks configured, such as a JPA based Event Store (see JpaEventStorageEngine), a JpaTokenStore and JpaSagaStore.
      This method allows to provide a transaction manager for usage in JTA-managed entity manager.
      Parameters:
      entityManagerProvider - The instance that provides access to the JPA EntityManager.
      transactionManager - TransactionManager to be used for accessing the entity manager.
      Returns:
      A Configurer instance for further configuration.
    • jpaConfiguration

      public static Configurer jpaConfiguration(EntityManagerProvider entityManagerProvider)
      Returns a Configurer instance which has JPA versions of building blocks configured, such as a JPA based Event Store (see JpaEventStorageEngine), a JpaTokenStore and JpaSagaStore.
      This configuration should be used with an entity manager running without JTA transaction. If you are using a entity manager in JTA mode, please provide the corresponding TransactionManager in the jpaConfiguration(EntityManagerProvider, TransactionManager) method.
      Parameters:
      entityManagerProvider - The instance that provides access to the JPA EntityManager.
      Returns:
      A Configurer instance for further configuration.
    • defaultComponent

      protected <T> Optional<T> defaultComponent(Class<T> type, Configuration configuration)
      Method returning a default component to use for given type for given configuration, or an empty Optional if no default can be provided.
      Type Parameters:
      T - The type of component.
      Parameters:
      type - The type of component to find a default for.
      configuration - The configuration the component is configured in.
      Returns:
      An Optional containing a default component, or empty if none can be provided.
    • defaultCommandGateway

      protected CommandGateway defaultCommandGateway(Configuration config)
      Returns a DefaultCommandGateway that will use the configuration's CommandBus to dispatch commands.
      Parameters:
      config - The configuration that supplies the command bus.
      Returns:
      The default command gateway.
    • defaultQueryGateway

      protected QueryGateway defaultQueryGateway(Configuration config)
      Returns a DefaultQueryGateway that will use the configuration's QueryBus to dispatch queries.
      Parameters:
      config - The configuration that supplies the query bus.
      Returns:
      The default query gateway.
    • defaultQueryBus

      protected QueryBus defaultQueryBus(Configuration config)
      Provides the default QueryBus implementations. Subclasses may override this method to provide their own default.
      Parameters:
      config - The configuration based on which the component is initialized.
      Returns:
      The default QueryBus to use.
    • defaultQueryUpdateEmitter

      protected QueryUpdateEmitter defaultQueryUpdateEmitter(Configuration config)
      Provides the default QueryUpdateEmitter implementation. Subclasses may override this method to provide their own default.
      Parameters:
      config - The configuration based on which the component is initialized
      Returns:
      The default QueryUpdateEmitter to use
    • defaultParameterResolverFactory

      protected ParameterResolverFactory defaultParameterResolverFactory(Configuration config)
      Provides the default ParameterResolverFactory. Subclasses may override this method to provide their own default.
      Parameters:
      config - The configuration based on which the component is initialized.
      Returns:
      The default ParameterResolverFactory to use.
    • defaultHandlerDefinition

      protected HandlerDefinition defaultHandlerDefinition(Class<?> inspectedClass)
      Provides the default HandlerDefinition. Subclasses may override this method to provide their own default.
      Parameters:
      inspectedClass - The class being inspected for handlers
      Returns:
      The default HandlerDefinition to use
    • defaultCommandBus

      protected CommandBus defaultCommandBus(Configuration config)
      Provides the default CommandBus implementation. Subclasses may override this method to provide their own default.
      Parameters:
      config - The configuration based on which the component is initialized.
      Returns:
      The default CommandBus to use.
    • defaultResourceInjector

      protected ResourceInjector defaultResourceInjector(Configuration config)
      Returns a ConfigurationResourceInjector that injects resources defined in the given config Configuration.
      Parameters:
      config - The configuration that supplies registered components.
      Returns:
      A resource injector that supplies components registered with the configuration.
    • defaultScopeAwareProvider

      protected ScopeAwareProvider defaultScopeAwareProvider(Configuration config)
      Returns a ScopeAwareProvider that provides ScopeAware instances to be used by a DeadlineManager. Uses the given config to construct the default ConfigurationScopeAwareProvider.
      Parameters:
      config - the configuration used to construct the default ConfigurationScopeAwareProvider
      Returns:
      a ScopeAwareProvider that provides ScopeAware instances to be used by a DeadlineManager
    • defaultDeadlineManager

      protected DeadlineManager defaultDeadlineManager(Configuration config)
      Provides the default DeadlineManager implementation. Subclasses may override this method to provide their own default.
      Parameters:
      config - The configuration that supplies registered components.
      Returns:
      The default DeadlineManager to use
    • defaultEventBus

      protected EventBus defaultEventBus(Configuration config)
      Provides the default EventBus implementation. Subclasses may override this method to provide their own default.
      Parameters:
      config - The configuration based on which the component is initialized.
      Returns:
      The default EventBus to use.
    • defaultEventGateway

      protected EventGateway defaultEventGateway(Configuration config)
      Returns a DefaultEventGateway that will use the configuration's EventBus to publish events.
      Parameters:
      config - The configuration that supplies the event bus.
      Returns:
      The default event gateway.
    • defaultSpanFactory

      protected SpanFactory defaultSpanFactory(Configuration config)
      Returns the default SpanFactory, or a NoOpSpanFactory if none it set.
      Parameters:
      config - The configuration that supplies the span factory.
      Returns:
      The default SpanFactory.
    • defaultSnapshotterSpanFactory

      protected SnapshotterSpanFactory defaultSnapshotterSpanFactory(Configuration config)
      Returns the default SnapshotterSpanFactory, or a DefaultSnapshotterSpanFactory backed by the configured SpanFactory if none it set.
      Parameters:
      config - The configuration that supplies the span factory.
      Returns:
      The default SnapshotterSpanFactory.
    • defaultCommandBusSpanFactory

      protected CommandBusSpanFactory defaultCommandBusSpanFactory(Configuration config)
      Returns the default CommandBusSpanFactory, or a DefaultCommandBusSpanFactory backed by the configured SpanFactory if none it set.
      Parameters:
      config - The configuration that supplies the span factory.
      Returns:
      The default CommandBusSpanFactory.
    • defaultQueryBusSpanFactory

      protected QueryBusSpanFactory defaultQueryBusSpanFactory(Configuration config)
      Returns the default QueryBusSpanFactory, or a DefaultQueryBusSpanFactory backed by the configured SpanFactory if none it set.
      Parameters:
      config - The configuration that supplies the span factory.
      Returns:
      The default QueryBusSpanFactory.
    • defaultQueryUpdateEmitterSpanFactory

      protected QueryUpdateEmitterSpanFactory defaultQueryUpdateEmitterSpanFactory(Configuration config)
      Returns the default QueryUpdateEmitterSpanFactory, or a DefaultQueryUpdateEmitterSpanFactory backed by the configured SpanFactory if none it set.
      Parameters:
      config - The configuration that supplies the span factory.
      Returns:
      The default QueryUpdateEmitterSpanFactory.
    • defaultEventBusSpanFactory

      protected EventBusSpanFactory defaultEventBusSpanFactory(Configuration config)
      Returns the default EventBusSpanFactory, or a DefaultEventBusSpanFactory backed by the configured SpanFactory if none it set.
      Parameters:
      config - The configuration that supplies the span factory.
      Returns:
      The default EventBusSpanFactory.
    • defaultDeadlineManagerSpanFactory

      protected DeadlineManagerSpanFactory defaultDeadlineManagerSpanFactory(Configuration config)
      Returns the default DeadlineManagerSpanFactory, or a DefaultDeadlineManagerSpanFactory backed by the configured SpanFactory if none it set.
      Parameters:
      config - The configuration that supplies the span factory.
      Returns:
      The default DeadlineManagerSpanFactory.
    • defaultRepositorySpanFactory

      protected RepositorySpanFactory defaultRepositorySpanFactory(Configuration config)
      Returns the default RepositorySpanFactory, or a DefaultRepositorySpanFactory backed by the configured SpanFactory if none it set.
      Parameters:
      config - The configuration that supplies the span factory.
      Returns:
      The default RepositorySpanFactory.
    • defaultEventProcessorSpanFactory

      protected EventProcessorSpanFactory defaultEventProcessorSpanFactory(Configuration config)
      Returns the default EventProcessorSpanFactory, or a DefaultEventProcessorSpanFactory backed by the configured SpanFactory if none it set.
      Parameters:
      config - The configuration that supplies the span factory.
      Returns:
      The default EventProcessorSpanFactory.
    • defaultSagaManagerSpanFactory

      protected SagaManagerSpanFactory defaultSagaManagerSpanFactory(Configuration config)
      Returns the default SagaManagerSpanFactory, or a DefaultSagaManagerSpanFactory backed by the configured SpanFactory if none it set.
      Parameters:
      config - The configuration that supplies the span factory.
      Returns:
      The default SagaManagerSpanFactory.
    • defaultSerializer

      protected Serializer defaultSerializer(Configuration config)
      Provides the default Serializer implementation. Subclasses may override this method to provide their own default.
      Parameters:
      config - The configuration based on which the component is initialized.
      Returns:
      The default Serializer to use.
    • defaultUpcasterChain

      protected EventUpcasterChain defaultUpcasterChain(Configuration config)
      Provides the default EventUpcasterChain implementation, looping through all registered EventUpcasters to collect them for a fresh EventUpcasterChain. Subclasses may override this method to provide their own default.
      Parameters:
      config - The configuration based on which the component is initialized.
      Returns:
      The default EventUpcasterChain to use.
    • defaultSnapshotter

      protected Snapshotter defaultSnapshotter(Configuration config)
      Provides the default Snapshotter implementation, defaulting to a AggregateSnapshotter. Subclasses may override this method to provide their own default.
      Parameters:
      config - the configuration based on which the Snapshotter will be initialized
      Returns:
      the default Snapshotter
    • eventProcessing

      public EventProcessingConfigurer eventProcessing()
      Description copied from interface: Configurer
      Retrieve the EventProcessingConfigurer registered as a module with this Configurer. If there aren't any, it will create an EventProcessingModule and register it as a module. If there are multiple, an AxonConfigurationException is thrown.
      Specified by:
      eventProcessing in interface Configurer
      Returns:
      an instance of Event Processing Configurer
    • registerEventUpcaster

      public Configurer registerEventUpcaster(@Nonnull Function<Configuration,EventUpcaster> upcasterBuilder)
      Description copied from interface: Configurer
      Registers an upcaster to be used to upcast Events to a newer version
      Specified by:
      registerEventUpcaster in interface Configurer
      Parameters:
      upcasterBuilder - The function that returns an EventUpcaster based on the configuration
      Returns:
      the current instance of the Configurer, for chaining purposes
    • configureMessageMonitor

      public Configurer configureMessageMonitor(@Nonnull Function<Configuration,BiFunction<Class<?>,String,MessageMonitor<Message<?>>>> builder)
      Description copied from interface: Configurer
      Configures the Message Monitor to use for the Message processing components in this configuration, unless more specific configuration based on the component's type, or type and name is available. The builder function receives the type of component as well as its name as input, and is expected to return a MessageMonitor instance to be used by that type of component.
      Specified by:
      configureMessageMonitor in interface Configurer
      Parameters:
      builder - The MessageMonitor builder function
      Returns:
      the current instance of the Configurer, for chaining purposes
    • configureMessageMonitor

      public Configurer configureMessageMonitor(@Nonnull Class<?> componentType, @Nonnull MessageMonitorFactory messageMonitorFactory)
      Description copied from interface: Configurer
      Configures the factory to create the Message Monitor for the Message processing components in this configuration that match the given componentType, unless more specific configuration based on both type and name is available.

      A component matches componentType if componentType is assignable from the component's class. If a component matches multiple types, and the types derive from each other, the configuration from the most derived type is used. If the matching types do not derive from each other, the result is unspecified.

      For example: in case a monitor is configured for CommandBus and another monitor is configured for SimpleCommandBus), components of type AsynchronousCommandBus will use the monitor configured for the SimpleCommandBus.

      A component's name matches componentName if they are identical; i.e. they are compared case sensitively.

      Specified by:
      configureMessageMonitor in interface Configurer
      Parameters:
      componentType - The declared type of the component
      messageMonitorFactory - The factory to use
      Returns:
      the current instance of the Configurer, for chaining purposes
    • configureMessageMonitor

      public Configurer configureMessageMonitor(@Nonnull Class<?> componentType, @Nonnull String componentName, @Nonnull MessageMonitorFactory messageMonitorFactory)
      Description copied from interface: Configurer
      Configures the factory create the Message Monitor for those Message processing components in this configuration that match the given class and name.

      A component matches componentType if componentType is assignable from the component's class. If a component matches multiple types, and the types derive from each other, the configuration from the most derived type is used. If the matching types do not derive from each other, the result is unspecified.

      For example: in case a monitor is configured for CommandBus and another monitor is configured for SimpleCommandBus), components of type AsynchronousCommandBus will use the monitor configured for the SimpleCommandBus.

      A component's name matches componentName if they are identical; i.e. they are compared case sensitively.

      Specified by:
      configureMessageMonitor in interface Configurer
      Parameters:
      componentType - The declared type of the component
      componentName - The name of the component
      messageMonitorFactory - The factory to use
      Returns:
      the current instance of the Configurer, for chaining purposes
    • configureCorrelationDataProviders

      public Configurer configureCorrelationDataProviders(@Nonnull Function<Configuration,List<CorrelationDataProvider>> correlationDataProviderBuilder)
      Description copied from interface: Configurer
      Configures the CorrelationDataProviders that Message processing components should use to attach correlation data to outgoing messages. The builder function receives the Configuration as input and is expected to return a list or CorrelationDataProviders.
      Specified by:
      configureCorrelationDataProviders in interface Configurer
      Parameters:
      correlationDataProviderBuilder - the builder function returning the CorrelationDataProvider list
      Returns:
      the current instance of the Configurer, for chaining purposes
    • registerModule

      public Configurer registerModule(@Nonnull ModuleConfiguration module)
      Description copied from interface: Configurer
      Registers an Axon module with this configuration. The module is initialized when the configuration is created and has access to the global configuration when initialized.

      Typically, modules are registered for Event Handling components or Sagas.

      Specified by:
      registerModule in interface Configurer
      Parameters:
      module - The module to register
      Returns:
      the current instance of the Configurer, for chaining purposes
      See Also:
    • registerComponent

      public <C> Configurer registerComponent(@Nonnull Class<C> componentType, @Nonnull Function<Configuration,? extends C> componentBuilder)
      Description copied from interface: Configurer
      Registers a component which should be made available to other components or modules in this Configuration. The builder function gets this configuration as input, and is expected to provide the component as output.

      Where possible, it is recommended to use the explicit configure... and register... methods.

      Specified by:
      registerComponent in interface Configurer
      Type Parameters:
      C - The type of component
      Parameters:
      componentType - The declared type of the component, typically an interface
      componentBuilder - The builder function of this component
      Returns:
      the current instance of the Configurer, for chaining purposes
    • registerCommandHandler

      public Configurer registerCommandHandler(@Nonnull Function<Configuration,Object> commandHandlerBuilder)
      Description copied from interface: Configurer
      Registers a command handler bean with this Configurer. The bean may be of any type. The actual command handler methods will be detected based on the annotations present on the bean's methods. Message handling functions annotated with CommandHandler will be taken into account.

      The builder function receives the Configuration as input, and is expected to return a fully initialized instance of the command handler bean.

      Specified by:
      registerCommandHandler in interface Configurer
      Parameters:
      commandHandlerBuilder - the builder function of the command handler bean
      Returns:
      the current instance of the Configurer, for chaining purposes
    • registerQueryHandler

      public Configurer registerQueryHandler(@Nonnull Function<Configuration,Object> queryHandlerBuilder)
      Description copied from interface: Configurer
      Registers a query handler bean with this Configurer. The bean may be of any type. The actual query handler methods will be detected based on the annotations present on the bean's methods. Message handling functions annotated with QueryHandler will be taken into account.

      The builder function receives the Configuration as input, and is expected to return a fully initialized instance of the query handler bean.

      Specified by:
      registerQueryHandler in interface Configurer
      Parameters:
      queryHandlerBuilder - the builder function of the query handler bean
      Returns:
      the current instance of the Configurer, for chaining purposes
    • registerMessageHandler

      public Configurer registerMessageHandler(@Nonnull Function<Configuration,Object> messageHandlerBuilder)
      Description copied from interface: Configurer
      Registers a message handler bean with this configuration. The bean may be of any type. The actual message handler methods will be detected based on the annotations present on the bean's methods. Message handling functions annotated with CommandHandler, EventHandler and QueryHandler will be taken into account.

      The builder function receives the Configuration as input, and is expected to return a fully initialized instance of the message handler bean.

      Specified by:
      registerMessageHandler in interface Configurer
      Parameters:
      messageHandlerBuilder - the builder function of the message handler bean
      Returns:
      the current instance of the Configurer, for chaining purposes
    • configureEmbeddedEventStore

      public Configurer configureEmbeddedEventStore(@Nonnull Function<Configuration,EventStorageEngine> storageEngineBuilder)
      Description copied from interface: Configurer
      Configures an Embedded Event Store which uses the given Event Storage Engine to store its events. The builder receives the Configuration as input and is expected to return a fully initialized EventStorageEngine instance.
      Specified by:
      configureEmbeddedEventStore in interface Configurer
      Parameters:
      storageEngineBuilder - The builder function for the EventStorageEngine
      Returns:
      the current instance of the Configurer, for chaining purposes
    • configureEventSerializer

      public Configurer configureEventSerializer(@Nonnull Function<Configuration,Serializer> eventSerializerBuilder)
      Description copied from interface: Configurer
      Configures the given event Serializer to use in this configuration. The builder receives the Configuration as input and is expected to return a fully initialized Serializer instance.

      This Serializer is specifically used to serialize EventMessage payload and metadata.

      Specified by:
      configureEventSerializer in interface Configurer
      Parameters:
      eventSerializerBuilder - The builder function for the Serializer.
      Returns:
      The current instance of the Configurer, for chaining purposes.
    • configureMessageSerializer

      public Configurer configureMessageSerializer(@Nonnull Function<Configuration,Serializer> messageSerializerBuilder)
      Description copied from interface: Configurer
      Configures the given event Serializer to use in this configuration. The builder receives the Configuration as input and is expected to return a fully initialized Serializer instance.

      This Serializer is specifically used to serialize Message payload and Metadata.

      Specified by:
      configureMessageSerializer in interface Configurer
      Parameters:
      messageSerializerBuilder - The builder function for the Serializer.
      Returns:
      The current instance of the Configurer, for chaining purposes.
    • configureAggregate

      public <A> Configurer configureAggregate(@Nonnull AggregateConfiguration<A> aggregateConfiguration)
      Description copied from interface: Configurer
      Configures an Aggregate in this configuration based on the given aggregateConfiguration. This method allows for more fine-grained configuration compared to the Configurer.configureAggregate(Class) method.
      Specified by:
      configureAggregate in interface Configurer
      Type Parameters:
      A - The type of aggregate the configuration is for
      Parameters:
      aggregateConfiguration - The instance describing the configuration of an Aggregate
      Returns:
      the current instance of the Configurer, for chaining purposes
      See Also:
    • registerHandlerDefinition

      public Configurer registerHandlerDefinition(@Nonnull BiFunction<Configuration,Class,HandlerDefinition> handlerDefinitionClass)
      Description copied from interface: Configurer
      Registers the definition of a Handler class. Defaults to annotation based recognition of handler methods.
      Specified by:
      registerHandlerDefinition in interface Configurer
      Parameters:
      handlerDefinitionClass - A function providing the definition based on the current Configuration as well as the class being inspected.
      Returns:
      the current instance of the Configurer, for chaining purposes
    • registerHandlerEnhancerDefinition

      public Configurer registerHandlerEnhancerDefinition(Function<Configuration,HandlerEnhancerDefinition> handlerEnhancerBuilder)
      Description copied from interface: Configurer
      Registers a builder function for a HandlerEnhancerDefinition used during constructing of the default HandlerDefinition.

      Any number of handler enhancer builder functions can be registered through this method. Note that any HandlerEnhancerDefinitions registered through this method are ignored for handlers matching the type used in the Configurer.registerHandlerDefinition(BiFunction) method's lambda.

      Specified by:
      registerHandlerEnhancerDefinition in interface Configurer
      Parameters:
      handlerEnhancerBuilder - A lambda constructing a HandlerEnhancerDefinition based on the Configuration.
      Returns:
      The current instance of the Configurer, for chaining purposes.
    • configureLifecyclePhaseTimeout

      public Configurer configureLifecyclePhaseTimeout(long timeout, TimeUnit timeUnit)
      Description copied from interface: Configurer
      Configures the timeout of each lifecycle phase. The Configurer invokes lifecycle phases during start-up and shutdown of an application.

      Note that if a lifecycle phase exceeds the configured timeout and timeUnit combination, the Configurer will proceed with the following phase. A phase-skip is marked with a warn logging message, as the chances are high this causes undesired side effects.

      The default lifecycle phase timeout is five seconds.

      Specified by:
      configureLifecyclePhaseTimeout in interface Configurer
      Parameters:
      timeout - the amount of time to wait for lifecycle phase completion
      timeUnit - the unit in which the timeout is expressed
      Returns:
      the current instance of the Configurer, for chaining purposes
      See Also:
    • buildConfiguration

      public Configuration buildConfiguration()
      Description copied from interface: Configurer
      Returns the completely initialized Configuration built using this configurer. It is not recommended to change any configuration on this Configurer once this method is called.
      Specified by:
      buildConfiguration in interface Configurer
      Returns:
      the fully initialized Configuration
    • prepareModules

      protected void prepareModules()
      Prepare the registered modules for initialization. This ensures all lifecycle handlers are registered.
    • prepareMessageHandlerRegistrars

      protected void prepareMessageHandlerRegistrars()
      Prepare the registered message handlers MessageHandlerRegistrar for initialization. This ensures their lifecycle handlers are registered.
    • invokeInitHandlers

      protected void invokeInitHandlers()
      Calls all registered init handlers. Registration of init handlers after this invocation will result in an immediate invocation of that handler.
    • invokeStartHandlers

      protected void invokeStartHandlers()
      Invokes all registered start handlers.
    • invokeShutdownHandlers

      protected void invokeShutdownHandlers()
      Invokes all registered shutdown handlers.
    • getConfig

      protected Configuration getConfig()
      Returns the current Configuration object being built by this Configurer, without initializing it. Note that retrieving objects from this configuration may lead to premature initialization of certain components.
      Returns:
      The current Configuration object being built by this Configurer.
    • getComponents

      public Map<Class<?>,Component<?>> getComponents()
      Returns a map of all registered components in this configuration. The key of the map is the registered component type (typically an interface), the value is a Component instance that wraps the actual implementation. Note that calling Component.get() may prematurely initialize a component.
      Returns:
      A map of all registered components in this configuration.
    • onStart

      public void onStart(int phase, LifecycleHandler startHandler)
      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)
      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: