Interface MethodPayloadTypeInferrer

All Known Implementing Classes:
DefaultMethodPayloadTypeInferrer
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface MethodPayloadTypeInferrer
Strategy interface for inferring the payload type from a listener method signature. Implementations analyze the method parameters and argument resolvers to dynamically determine which parameter represents the message payload and what its type is.
Since:
3.4.3
Author:
Tomaz Fernandes
  • Method Details

    • inferPayloadType

      @Nullable Class<?> inferPayloadType(Method method, @Nullable List<HandlerMethodArgumentResolver> argumentResolvers)
      Infer the payload class from the given method and its argument resolvers.
      Parameters:
      method - the listener method
      argumentResolvers - the argument resolvers available for this method, may be null or empty
      Returns:
      the inferred payload class, or null if it cannot be determined