org.mule.api.annotations.param
Annotation Type InboundHeaders


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

Used on component methods, this annotation marks the method parameter that will be used to pass in one or more of the headers received. This annotation value can define a single header, a comma-separated list of header names, '*' to denote all headers, or a comma-separated list of wildcard expressions such as 'MULE_*, X-*'. By default, if a named header is not present on the current message, an exception will be thrown. However, if the header name is defined with the '?' post fix, it will be marked as optional.

When defining multiple header names or using wildcards, the parameter can be a Map or List. If a Map is used, the header name and value is passed in. If List is used, just the header values are used. If a single header name is defined, the header type can be used as the parameter type, though List or Map can be used too. The Inbound headers collection is immutable, so the headers Map or List passed in will be immutable too. Attempting to write to the Map or List will result in an UnsupportedOperationException.


Required Element Summary
 String value
          Defines the headers that should be injected into the parameter.
 

Element Detail

value

public abstract String value
Defines the headers that should be injected into the parameter. This can be a single header, a comma-separated list of header names,'*' to denote all headers or a comma-separated list of wildcard expressions. By default, if a named header is not present, an exception will be thrown. However, if the header name is defined with the '?' post fix, it will be marked as optional. The optional '?' post fix is not supported when using wildcard expressions

Returns:
the header expression used to query the message for headers


Copyright © 2003-2012 MuleSoft, Inc.. All Rights Reserved.