Annotation Interface EventHeader


@Target(PARAMETER) @Retention(RUNTIME) @Documented public @interface EventHeader
Annotation which indicates that a method parameter should be bound to a event header.
Author:
Janne Valkealahti
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    The name of the request header to bind to.
    boolean
    Whether the header is required.
    Alias for name().
  • Element Details

    • value

      @AliasFor("name") String value
      Alias for name().
      Returns:
      the header name
      Default:
      ""
    • name

      @AliasFor("value") String name
      The name of the request header to bind to.
      Returns:
      the header name
      Default:
      ""
    • required

      boolean required
      Whether the header is required.

      Default is true, leading to an exception if the header is missing. Switch this to false if you prefer a null value in case of a header missing.

      Returns:
      the required flag
      Default:
      true