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 in the ProcessingContext using the DeadLetter.RESOURCE_KEY.
Hence, the DeadLetter processor is required to add it to the context before invoking the message handlers. If
no DeadLetter is present in the context, the resolver will return null.
The parameter resolver matches for any type of Message.
- Since:
- 4.7.0
- Author:
- Steven van Beelen, Mateusz Nowak
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@Nullable ParameterResolver<DeadLetter<?>> createInstance(Executable executable, Parameter[] parameters, int parameterIndex) If available, creates aParameterResolverinstance that can provide a parameter of typeparameterTypefor a given message.
-
Constructor Details
-
DeadLetterParameterResolverFactory
public DeadLetterParameterResolverFactory()
-
-
Method Details
-
createInstance
public @Nullable ParameterResolver<DeadLetter<?>> createInstance(Executable executable, Parameter[] parameters, int parameterIndex) Description copied from interface:ParameterResolverFactoryIf available, creates aParameterResolverinstance that can provide a parameter of typeparameterTypefor a given message.If the
ParameterResolverFactorycannot provide a suitableParameterResolver, returnsnull.- Specified by:
createInstancein interfaceParameterResolverFactory- Parameters:
executable- The executable (constructor or method) to inspect.parameters- The parameters on the executable to inspect.parameterIndex- The index of the parameter to return aParameterResolverfor.- Returns:
- A suitable
ParameterResolver, ornullif none is found.
-