Class DeadLetterParameterResolverFactory

java.lang.Object
org.axonframework.messaging.deadletter.DeadLetterParameterResolverFactory
All Implemented Interfaces:
ParameterResolverFactory

public class DeadLetterParameterResolverFactory extends Object implements 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 Details

    • DeadLetterParameterResolverFactory

      public DeadLetterParameterResolverFactory()
  • Method Details

    • createInstance

      public ParameterResolver<DeadLetter<?>> createInstance(Executable executable, Parameter[] parameters, int parameterIndex)
      Description copied from interface: ParameterResolverFactory
      If available, creates a ParameterResolver instance that can provide a parameter of type parameterType for a given message.

      If the ParameterResolverFactory cannot provide a suitable ParameterResolver, returns null.

      Specified by:
      createInstance in interface ParameterResolverFactory
      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 a ParameterResolver for
      Returns:
      a suitable ParameterResolver, or null if none is found