Class ConfigurationResourceInjector

java.lang.Object
org.axonframework.modelling.saga.AbstractResourceInjector
org.axonframework.config.ConfigurationResourceInjector
All Implemented Interfaces:
ResourceInjector

public class ConfigurationResourceInjector extends AbstractResourceInjector
ResourceInjector implementation that injects resources defined in the Axon Configuration.
  • Constructor Details

    • ConfigurationResourceInjector

      public ConfigurationResourceInjector(Configuration configuration)
      Initializes the ResourceInjector to inject the resources found in the given configuration.
      Parameters:
      configuration - the Configuration to find injectable resources in
  • Method Details

    • findResource

      protected <R> Optional<R> findResource(Class<R> requiredType)
      Description copied from class: AbstractResourceInjector
      Returns a resource of given requiredType or an empty Optional if the resource is not registered with the injector.
      Specified by:
      findResource in class AbstractResourceInjector
      Type Parameters:
      R - the resource type
      Parameters:
      requiredType - the class of the resource to find
      Returns:
      an Optional that contains the resource if it was found