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 -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionbooleanIndicates whether the Metadata must be available in order for the Message handler method to be invoked.
-
Element Details
-
value
String valueThe key of the Metadata field to inject as method parameter.- Returns:
- The key of the Metadata field to inject as method parameter.
-
required
boolean requiredIndicates whether the Metadata must be available in order for the Message handler method to be invoked. Defaults tofalse, in which casenullis injected as parameter. Note that if the annotated parameter is a primitive type, the required property will always betrue.- Returns:
- Whether the metadata value is required, yes or no.
- Default:
false
-