Package org.axonframework.config
Class ConfigurationResourceInjector
java.lang.Object
org.axonframework.modelling.saga.AbstractResourceInjector
org.axonframework.config.ConfigurationResourceInjector
- All Implemented Interfaces:
ResourceInjector
ResourceInjector implementation that injects resources defined in the Axon Configuration.
-
Constructor Summary
ConstructorsConstructorDescriptionConfigurationResourceInjector(Configuration configuration) Initializes the ResourceInjector to inject the resources found in the givenconfiguration. -
Method Summary
Modifier and TypeMethodDescriptionprotected <R> Optional<R> findResource(Class<R> requiredType) Returns a resource of givenrequiredTypeor an empty Optional if the resource is not registered with the injector.Methods inherited from class org.axonframework.modelling.saga.AbstractResourceInjector
injectorAnnotationNames, injectResources
-
Constructor Details
-
ConfigurationResourceInjector
Initializes the ResourceInjector to inject the resources found in the givenconfiguration.- Parameters:
configuration- the Configuration to find injectable resources in
-
-
Method Details
-
findResource
Description copied from class:AbstractResourceInjectorReturns a resource of givenrequiredTypeor an empty Optional if the resource is not registered with the injector.- Specified by:
findResourcein classAbstractResourceInjector- 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
-