Package org.axonframework.config
Class ConfigurationParameterResolverFactory
java.lang.Object
org.axonframework.config.ConfigurationParameterResolverFactory
- All Implemented Interfaces:
ParameterResolverFactory
public class ConfigurationParameterResolverFactory
extends Object
implements ParameterResolverFactory
ParameterResolverFactory implementation that resolves parameters from available components in the Configuration
instance it was configured with.
This implementation is usually auto-configured when using the Configuration API.
-
Constructor Summary
ConstructorsConstructorDescriptionConfigurationParameterResolverFactory(Configuration configuration) Initialize an instance using givenconfigurationto supply the value to resolve parameters with -
Method Summary
Modifier and TypeMethodDescriptioncreateInstance(Executable executable, Parameter[] parameters, int parameterIndex) If available, creates a ParameterResolver instance that can provide a parameter of typeparameterTypefor a given message.
-
Constructor Details
-
ConfigurationParameterResolverFactory
Initialize an instance using givenconfigurationto supply the value to resolve parameters with- Parameters:
configuration- The configuration to look for component
-
-
Method Details
-
createInstance
public ParameterResolver<?> createInstance(Executable executable, Parameter[] parameters, int parameterIndex) Description copied from interface:ParameterResolverFactoryIf available, creates a ParameterResolver instance that can provide a parameter of typeparameterTypefor a given message.If the ParameterResolverFactory cannot provide a suitable ParameterResolver, returns
null.- Specified by:
createInstancein interfaceParameterResolverFactory- Parameters:
executable- The executable (constructor or method) to inspectparameters- The parameters on the executable to inspectparameterIndex- The index of the parameter to return a ParameterResolver for- Returns:
- a suitable ParameterResolver, or
nullif none is found
-