Class PayloadParameterResolver

java.lang.Object
io.fluxzero.sdk.tracking.handling.PayloadParameterResolver

public class PayloadParameterResolver extends Object
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 Details

    • PayloadParameterResolver

      public PayloadParameterResolver()
  • Method Details

    • matches

      public boolean matches(Parameter p, Annotation methodAnnotation, HasMessage value)
    • resolve

      public Function<HasMessage, Object> resolve(Parameter p, Annotation methodAnnotation)
    • test

      public boolean test(HasMessage message, Parameter parameter)
    • 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.

      Returns:
      true, signaling that this resolver helps determine method specificity
    • mayApply

      default boolean mayApply(Executable arg0, Class<?> arg1)