Annotation Interface ResultHandler


Meta-Annotation used to demarcate MessageHandlerInterceptor annotated methods as interceptors that should only act on the result of a handler invocation. This gives these handlers the opportunity to act on the result only, without intercepting the call on the way to the handler.

The resultType() can be used to limit the types of responses the handler should be invoked for.

This annotation is exclusively meant as a Meta-Annotation and cannot not be placed directly on a method.

Since:
4.4.0
Author:
Allard Buijze
See Also:
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    The type of result object that the annotated handler should be invoked for.
  • Element Details

    • resultType

      Class<?> resultType
      The type of result object that the annotated handler should be invoked for. The handler will be ignored if the actual response type (regular or thrown exception) is not an instance of the type defined by this property, even when the parameters of the method match the result.
      Returns:
      The type of result returned my functions annotated with
      invalid @link
      {@link @ResultHandler
      }
      Default:
      java.lang.Object.class