org.axonframework.common.annotation
Annotation Type MetaData


@Documented
@Target(value=PARAMETER)
@Retention(value=RUNTIME)
public @interface MetaData

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
Author:
Allard Buijze

Required Element Summary
 String value
          The key of the MetaData field to inject.
 
Optional Element Summary
 boolean required
          Indicates whether the MetaData must be available in order for the Message handler method to be invoked.
 

Element Detail

value

public abstract String value
The key of the MetaData field to inject.

required

public abstract 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.

Default:
false


Copyright © 2010-2016. All Rights Reserved.