Interface ParameterResolver<T>

Type Parameters:
T - The type of parameter returned by this resolver
All Known Implementing Classes:
ConcludesBatchParameterResolverFactory, ConflictResolution, CurrentUnitOfWorkParameterResolverFactory, FixedValueParameterResolver, InterceptorChainParameterResolverFactory, PayloadParameterResolver, SequenceNumberParameterResolverFactory.SequenceNumberParameterResolver

public interface ParameterResolver<T>
Interface for a mechanism that resolves handler method parameter values from a given Message.
Since:
2.0
Author:
Allard Buijze
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    matches(Message<?> message)
    Indicates whether this resolver is capable of providing a value for the given message.
    Resolves the parameter value to use for the given message, or null if no suitable parameter value can be resolved.
    default Class<?>
    Returns the class of the payload that is supported by this resolver.
  • Method Details

    • resolveParameterValue

      T resolveParameterValue(Message<?> message)
      Resolves the parameter value to use for the given message, or null if no suitable parameter value can be resolved.
      Parameters:
      message - The message to resolve the value from
      Returns:
      the parameter value for the handler
    • matches

      boolean matches(Message<?> message)
      Indicates whether this resolver is capable of providing a value for the given message.
      Parameters:
      message - The message to evaluate
      Returns:
      true if this resolver can provide a value for the message, otherwise false
    • supportedPayloadType

      default Class<?> supportedPayloadType()
      Returns the class of the payload that is supported by this resolver. Defaults to the Object class indicating that the payload type is irrelevant for this resolver.
      Returns:
      The class of the payload that is supported by this resolver