@Retention(value=RUNTIME) @Target(value=PARAMETER) @Documented public @interface Payload
@Payload
annotation is used to specify that the parameter of a method
annotated with @Action
should carry the raw payload of the event. When
the corresponding action is linked to an event through a rule, the library will store
the raw payload of the event in the parameter annotated with @Payload
.
Currently for an action to receive payload it must have only one parameter and it
has to be annotated with payload. In this case the argumentNames
parameter of the @Action
annotation
must be empty. @Payload
annotation will not work as expected if the
method has multiple parameters.Copyright © 2014. All rights reserved.