INT-676
This commit is contained in:
@@ -6,9 +6,9 @@
|
||||
<para>
|
||||
A Channel Adapter is a Message Endpoint that enables connecting a single sender or receiver to a Message Channel.
|
||||
Spring Integration provides a number of adapters out of the box to support various transports, such as JMS, File,
|
||||
etc. Those will be discussed in upcoming chapters of this reference guide. However, this chapter focuses on the
|
||||
simple but flexible Method-invoking Channel Adapter support. There is an inbound and outbound adapter, and each
|
||||
may be configured with XML elements provided in the core namespace.
|
||||
HTTP, Web Services, and Mail. Those will be discussed in upcoming chapters of this reference guide. However, this
|
||||
chapter focuses on the simple but flexible Method-invoking Channel Adapter support. There are both inbound and
|
||||
outbound adapters, and each may be configured with XML elements provided in the core namespace.
|
||||
</para>
|
||||
|
||||
<section id="channel-adapter-namespace-inbound">
|
||||
@@ -18,9 +18,9 @@
|
||||
value to a <interfacename>MessageChannel</interfacename> after converting it to a <classname>Message</classname>.
|
||||
When the adapter's subscription is activated, a poller will attempt to receive messages from the source. The
|
||||
poller will be scheduled with the <interfacename>TaskScheduler</interfacename> according to the provided
|
||||
configuration. To configure the polling 'interval' or 'cronExpression' for an individual channel-adapter's
|
||||
schedule, provide a 'poller' element with either an 'interval-trigger' (in milliseconds) or 'cron-trigger'
|
||||
sub-element:
|
||||
configuration. To configure the polling interval or cron expression for an individual channel-adapter,
|
||||
provide a 'poller' element with either an 'interval-trigger' (in milliseconds) or 'cron-trigger'
|
||||
sub-element.
|
||||
<programlisting language="xml"><![CDATA[<inbound-channel-adapter ref="source1" method="method1" channel="channel1">
|
||||
<poller>
|
||||
<interval-trigger interval="5000"/>
|
||||
@@ -29,17 +29,23 @@
|
||||
|
||||
<inbound-channel-adapter ref="source2" method="method2" channel="channel2">
|
||||
<poller>
|
||||
<cron-trigger expression="30 * * * * MON-FRI"/>
|
||||
<cron-trigger expression="30 * 9-17 * * MON-FRI"/>
|
||||
</poller>
|
||||
</channel-adapter>]]></programlisting>
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
If no poller is provided, then a single default poller must be registered within the context.
|
||||
See <xref linkend="endpoint-namespace"/> for more detail.
|
||||
</para>
|
||||
</note>
|
||||
</section>
|
||||
|
||||
<section id="channel-adapter-namespace-outbound">
|
||||
<title>The <outbound-channel-adapter/> element</title>
|
||||
<para>
|
||||
An "outbound-channel-adapter" element can also connect a <interfacename>MessageChannel</interfacename> to any
|
||||
method that should be invoked with the payload of any Message sent to that channel.
|
||||
method that should be invoked with the payload of Messages sent to that channel.
|
||||
<programlisting language="xml"><![CDATA[<outbound-channel-adapter channel="channel1" ref="target1" method="method1"/>]]></programlisting>
|
||||
If the channel being adapted is a <interfacename>PollableChannel</interfacename>, provide a poller sub-element:
|
||||
<programlisting language="xml"><![CDATA[<outbound-channel-adapter channel="channel2" ref="target2" method="method2">
|
||||
|
||||
Reference in New Issue
Block a user