View Javadoc

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