Interface ParameterResolver<T>

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

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

    • resolveParameterValue

      @Nonnull CompletableFuture<T> resolveParameterValue(@Nonnull ProcessingContext context)
      Asynchronously resolves the parameter value from the context.
      Parameters:
      context - The current processing context.
      Returns:
      A CompletableFuture that will complete with the parameter value, or completes with null.
      Since:
      5.0.0
    • matches

      boolean matches(@Nonnull ProcessingContext context)
      Indicates whether this resolver is capable of providing a value for the given context.
      Parameters:
      context - The current processing context.
      Returns:
      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