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 Summary
Modifier and TypeMethodDescriptionbooleanmatches(ProcessingContext context) Indicates whether this resolver is capable of providing a value for the givencontext.resolveParameterValue(ProcessingContext context) Asynchronously resolves the parameter value from thecontext.default Class<?> Returns the class of the payload that is supported by this resolver.
-
Method Details
-
resolveParameterValue
Asynchronously resolves the parameter value from thecontext.- Parameters:
context- The current processing context.- Returns:
- A
CompletableFuturethat will complete with the parameter value, or completes withnull. - Since:
- 5.0.0
-
matches
Indicates whether this resolver is capable of providing a value for the givencontext.- Parameters:
context- The current processing context.- Returns:
- Returns
trueif this resolver can provide a value for the message, otherwisefalse.
-
supportedPayloadType
Returns the class of the payload that is supported by this resolver. Defaults to theObjectclass indicating that the payload type is irrelevant for this resolver.- Returns:
- The class of the payload that is supported by this resolver
-