Interface MethodInvocationValidator<M>

Type Parameters:
M - the message type
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 MethodInvocationValidator<M>
Validates method invocation arguments right before a handler method is invoked.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns a shared validator that accepts every invocation without additional checks.
    void
    validate(M message, Object target, Executable executable, Object[] arguments)
    Validates a prepared invocation before execution.
  • Field Details

  • Method Details

    • validate

      void validate(M message, Object target, Executable executable, Object[] arguments)
      Validates a prepared invocation before execution. Implementations may throw to reject the message, target, executable, or resolved arguments.
    • noOp

      static <M> MethodInvocationValidator<M> noOp()
      Returns a shared validator that accepts every invocation without additional checks.