java.lang.Object
io.fluxzero.sdk.tracking.handling.PayloadParameterResolver
- All Implemented Interfaces:
io.fluxzero.common.handling.ParameterResolver<HasMessage>
public class PayloadParameterResolver
extends Object
implements io.fluxzero.common.handling.ParameterResolver<HasMessage>
Resolves handler method parameters by injecting the message payload.
This resolver matches a parameter when its declared type is assignable from the actual payload class of the incoming message.
This resolver is typically used in conjunction with filters such as PayloadFilter to determine
handler compatibility based on payload types.
Special care is taken to allow null payloads for parameters that are declared nullable, which can occur during upcasting or transformation pipelines.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanIndicates that this resolver contributes to disambiguating handler methods when multiple handlers are present in the same target class.booleanfilterMessage(HasMessage message, Parameter parameter) booleanmatches(Parameter p, Annotation methodAnnotation, HasMessage value) resolve(Parameter p, Annotation methodAnnotation)
-
Constructor Details
-
PayloadParameterResolver
public PayloadParameterResolver()
-
-
Method Details
-
matches
- Specified by:
matchesin interfaceio.fluxzero.common.handling.ParameterResolver<HasMessage>
-
resolve
- Specified by:
resolvein interfaceio.fluxzero.common.handling.ParameterResolver<HasMessage>
-
filterMessage
- Specified by:
filterMessagein interfaceio.fluxzero.common.handling.ParameterResolver<HasMessage>
-
determinesSpecificity
public boolean determinesSpecificity()Indicates that this resolver contributes to disambiguating handler methods when multiple handlers are present in the same target class.This is useful when more than one method matches a message, and the framework must decide which method is more specific. If this returns
true, the resolver's presence and compatibility with the parameter may influence which handler is selected.- Specified by:
determinesSpecificityin interfaceio.fluxzero.common.handling.ParameterResolver<HasMessage>- Returns:
- true, signaling that this resolver helps determine method specificity
-