View Javadoc
1   /*
2    * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
3    * The software in this package is published under the terms of the CPAL v1.0
4    * license, a copy of which has been included with this distribution in the
5    * LICENSE.txt file.
6    */
7   package org.mule.api.annotations.param;
8   
9   import org.mule.api.annotations.meta.Evaluator;
10  
11  import java.lang.annotation.Documented;
12  import java.lang.annotation.ElementType;
13  import java.lang.annotation.Retention;
14  import java.lang.annotation.RetentionPolicy;
15  import java.lang.annotation.Target;
16  import java.util.Map;
17  
18  /**
19   * <p>
20   * Used on Components that have an outbound endpoint configured or a response being
21   * sent back, and enables users to set outbound/response headers via {@link Map}
22   * without needing to use the Mule API (other than using the annotation) on the
23   * method argument). This parameter annotation passes in a reference to a {@link Map}
24   * that can be used to populate outbound headers that will be set with the outgoing
25   * message. For example, when sending an email message, you may want to set
26   * properties such as "from" or "subject" as a sender header.
27   * </p>
28   * <p>
29   * This annotation must only be defined on a parameter of type {@link Map}.
30   * </p>
31   */
32  @Target(ElementType.PARAMETER)
33  @Retention(RetentionPolicy.RUNTIME)
34  @Documented
35  @Evaluator("outboundHeaders")
36  public @interface OutboundHeaders
37  {
38      // no custom methods
39  }