Class DeadLetterParameterResolverFactory
java.lang.Object
org.axonframework.messaging.deadletter.DeadLetterParameterResolverFactory
- All Implemented Interfaces:
ParameterResolverFactory
A
ParameterResolverFactory constructing a ParameterResolver resolving the DeadLetter that is
being processed.
Expects the DeadLetter to reside under the UnitOfWork.resources() using the class
name of the DeadLetter as the key. Hence, the DeadLetter processor is
required to add it to the resources before invoking the message handlers. If no UnitOfWork is active or there
is no DeadLetter is present, the resolver will return null.
The parameter resolver matches for any type of Message.
- Since:
- 4.7.0
- Author:
- Steven van Beelen
-
Constructor Summary
Constructors -
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
-
DeadLetterParameterResolverFactory
public DeadLetterParameterResolverFactory()
-
-
Method Details
-
createInstance
public ParameterResolver<DeadLetter<?>> 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
-