INT-1585 added documentation for header-filter
This commit is contained in:
@@ -31,7 +31,7 @@
|
||||
</section>
|
||||
|
||||
<section id="filter-namespace">
|
||||
<title>The <filter> Element</title>
|
||||
<title>Namespace support for Filter - <filter> Element</title>
|
||||
<para>
|
||||
The <filter> element is used to create a Message-selecting endpoint. In addition to "input-channel"
|
||||
and "output-channel" attributes, it requires a "ref". The "ref" may point to a MessageSelector implementation:
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
</section>
|
||||
|
||||
<section id="transformer-namespace">
|
||||
<title>The <transformer> Element</title>
|
||||
<title>Namespace support for Transformer - <transformer> Element</title>
|
||||
<para>
|
||||
The <transformer> element is used to create a Message-transforming endpoint. In addition to "input-channel"
|
||||
and "output-channel" attributes, it requires a "ref". The "ref" may either point to an Object that contains the
|
||||
@@ -156,7 +156,7 @@ public class Kid{
|
||||
</section>
|
||||
|
||||
<section id="transformer-annotation">
|
||||
<title>The @Transformer Annotation</title>
|
||||
<title>Annotation support for Transformer - @Transformer</title>
|
||||
<para>
|
||||
The <interfacename>@Transformer</interfacename> annotation can also be added to methods that expect either the
|
||||
<interfacename>Message</interfacename> type or the message payload type. The return value will be handled in the
|
||||
@@ -174,5 +174,22 @@ Order generateOrder(String productId, @Header("customerName") String customer) {
|
||||
}</programlisting>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id="header-filter">
|
||||
<title>Header Filter</title>
|
||||
|
||||
Some time your transformation use case might be as simple as removing a few headers.
|
||||
For this type of use cases Spring Integration provides <emphasis>Header Filter</emphasis> which allows you to specify which header should be
|
||||
removed from the output Message.
|
||||
Basically <emphasis>Header Filter</emphasis> is the opposite of <emphasis>Header Enricher</emphasis>
|
||||
that is discussed in <xref linkend="header-enricher"/>
|
||||
|
||||
<programlisting language="xml"><![CDATA[<int:header-filter input-channel="inputChannel"
|
||||
output-channel="outputChannel" header-names="lastName, state"/>]]></programlisting>
|
||||
|
||||
As you can see, configuration of <emphasis>Header Filter</emphasis> is quite simple. It is a typical endpoint with input/output channels
|
||||
and <code>header-names</code> attribute which allows you to specify the names of the headers (delimited by coma if multiple)
|
||||
that need to be removed. So, in the above example headers with the name 'lastName' and 'state' will be removed.
|
||||
</section>
|
||||
|
||||
</section>
|
||||
|
||||
Reference in New Issue
Block a user