Annotation Interface MetadataValue


@Documented @Target({PARAMETER,ANNOTATION_TYPE}) @Retention(RUNTIME) public @interface MetadataValue
Annotation that indicates the parameter needs to be resolved to the value of the Message Metadata stored under the given key. If required, and no such Metadata value is available, the handler will not be invoked.
Since:
2.0.0
Author:
Allard Buijze
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    The key of the Metadata field to inject as method parameter.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
    Indicates whether the Metadata must be available in order for the Message handler method to be invoked.
  • Element Details

    • value

      String value
      The key of the Metadata field to inject as method parameter.
      Returns:
      The key of the Metadata field to inject as method parameter.
    • required

      boolean required
      Indicates whether the Metadata must be available in order for the Message handler method to be invoked. Defaults to false, in which case null is injected as parameter.

      Note that if the annotated parameter is a primitive type, the required property will always be true.

      Returns:
      Whether the metadata value is required, yes or no.
      Default:
      false