updated some xrefs

This commit is contained in:
Mark Fisher
2008-10-21 00:44:35 +00:00
parent d2d06c459c
commit b22bb1dfbf

View File

@@ -12,9 +12,8 @@
XSD-based namespace for the majority of configuration combined with a handful of objects that are configured with XSD-based namespace for the majority of configuration combined with a handful of objects that are configured with
annotations. As much as possible, the two provide consistent naming. XML elements defined by the XSD schema will annotations. As much as possible, the two provide consistent naming. XML elements defined by the XSD schema will
match the names of annotations, and the attributes of those XML elements will match the names of annotation match the names of annotations, and the attributes of those XML elements will match the names of annotation
properties. Direct usage of the API is yet another option and is described in detail in <xref linkend="api"/>. properties. Direct usage of the API is of course always an option, but we expect that most users will choose one
We expect that most users will choose one of the higher-level options, such as the namespace-based or of the higher-level options, or a combination of the namespace-based and annotation-driven configuration.
annotation-driven configuration.
</para> </para>
</section> </section>
@@ -88,7 +87,7 @@
</para> </para>
<para> <para>
It is also possible to use more specific elements for the various channel types (as described in It is also possible to use more specific elements for the various channel types (as described in
<xref linkend="api-messagechannel"/>). Depending on the channel, these may provide additional configuration <xref linkend="channel-implementations"/>). Depending on the channel, these may provide additional configuration
options. Examples of each are shown below. options. Examples of each are shown below.
</para> </para>
<section id="namespace-channel-queuechannel"> <section id="namespace-channel-queuechannel">
@@ -147,7 +146,7 @@
</para> </para>
</section> </section>
<para> <para>
Message channels may also have interceptors as described in <xref linkend="api-channelinterceptor"/>. One or Message channels may also have interceptors as described in <xref linkend="channel-interceptors"/>. One or
more &lt;interceptor&gt; elements can be added as sub-elements of &lt;channel&gt; (or the more specific element more &lt;interceptor&gt; elements can be added as sub-elements of &lt;channel&gt; (or the more specific element
types). Provide the "ref" attribute to reference any Spring-managed object that implements the types). Provide the "ref" attribute to reference any Spring-managed object that implements the
<interfacename>ChannelInterceptor</interfacename> interface: <interfacename>ChannelInterceptor</interfacename> interface:
@@ -209,9 +208,9 @@
<programlisting language="xml">&lt;service-activator input-channel="exampleChannel" ref="exampleHandler"/&gt;</programlisting> <programlisting language="xml">&lt;service-activator input-channel="exampleChannel" ref="exampleHandler"/&gt;</programlisting>
</para> </para>
<para> <para>
The configuration above assumes that "exampleHandler" is an actual implementation of the The configuration above assumes that "exampleHandler" either contains a single method annotated with the
<interfacename>MessageHandler</interfacename> interface as described in <xref linkend="api-messagehandler"/>. @ServiceActivator annotation or that it contains a single public method period. To delegate to an explicitlye
To delegate to an arbitrary method of any object, simply add the "method" attribute. defined method of any object, simply add the "method" attribute.
<programlisting language="xml">&lt;service-activator input-channel="exampleChannel" ref="somePojo" method="someMethod"/&gt;</programlisting> <programlisting language="xml">&lt;service-activator input-channel="exampleChannel" ref="somePojo" method="someMethod"/&gt;</programlisting>
</para> </para>
<para> <para>
@@ -229,10 +228,9 @@
</para> </para>
</section> </section>
<para> <para>
Message Endpoints also support <interfacename>MessageSelectors</interfacename> as described in Message Endpoints also support <interfacename>MessageSelectors</interfacename>. To configure a selector with
<xref linkend="api-messageselector"/>. To configure a selector with namespace support, simply add the namespace support, simply add the "selector" attribute to the endpoint definition and reference an
"selector" attribute to the endpoint definition and reference an implementation of the implementation of the <interfacename>MessageSelector</interfacename> interface.
<interfacename>MessageSelector</interfacename> interface.
<programlisting language="xml"><![CDATA[<service-activator id="endpoint" input-channel="channel" ref="handler" <programlisting language="xml"><![CDATA[<service-activator id="endpoint" input-channel="channel" ref="handler"
selector="exampleSelector"/>]]></programlisting> selector="exampleSelector"/>]]></programlisting>
</para> </para>
@@ -308,11 +306,10 @@
<section id="namespace-messagebus"> <section id="namespace-messagebus">
<title>Configuring the Message Bus</title> <title>Configuring the Message Bus</title>
<para> <para>
As described in <xref linkend="api-messagebus"/>, the <classname>MessageBus</classname> plays a central role. The Message Bus plays a central role, but its configuration is quite simple since it is primarily concerned
Nevertheless, its configuration is quite simple since it is primarily concerned with managing internal details with managing internal details based on the configuration of channels and endpoints. The bus is aware of its
based on the configuration of channels and endpoints. The bus is aware of its host application context, and host application context, and therefore is also capable of auto-detecting the channels and endpoints.
therefore is also capable of auto-detecting the channels and endpoints. Typically, the The Message Bus can be configured with a single empty element:
<classname>MessageBus</classname> can be configured with a single empty element:
<programlisting language="xml">&lt;message-bus/&gt;</programlisting> <programlisting language="xml">&lt;message-bus/&gt;</programlisting>
</para> </para>
<para> <para>
@@ -346,16 +343,6 @@
is provided to an endpoint's poller, then it will be invoked in the dispatcher's thread (with the exception of is provided to an endpoint's poller, then it will be invoked in the dispatcher's thread (with the exception of
subscribable channels). subscribable channels).
</para> </para>
<para>
Finally, the type of channel that gets created automatically by the bus can be customized by defining a bean
that implements the ChannelFactory interface and whose name is "channelFactory".
<programlisting language="xml"><![CDATA[<message-bus/>
<beans:bean id="channelFactory"
class="org.springframework.integration.channel.factory.PriorityChannelFactory"/>]]></programlisting>
With this definition, all the channels created automatically will be <classname>PriorityChannel</classname> instances.
Without a "channelFactory" bean, the Message Bus will assume a default <classname>QueueChannelFactory</classname>.
</para>
</section> </section>
<section id="namespace-adapters"> <section id="namespace-adapters">
@@ -369,17 +356,6 @@
<!-- using the default "connectionFactory" reference --> <!-- using the default "connectionFactory" reference -->
<jms-target id="jmsTarget" destination="outQueue"/> <jms-target id="jmsTarget" destination="outQueue"/>
<file-source id="fileSource" directory="/tmp/in"/>
<file-target id="fileTarget" directory="/tmp/out"/>
<rmi-gateway id="rmiSource" request-channel="rmiSourceInput"/>
<rmi-handler id="rmiTarget"
local-channel="rmiTargetOutput"
remote-channel="someRemoteChannel"
host="somehost"/>
<httpinvoker-gateway id="httpSource" name="/some/path" request-channel="httpInvokerInput"/> <httpinvoker-gateway id="httpSource" name="/some/path" request-channel="httpInvokerInput"/>
<httpinvoker-handler id="httpTarget" channel="httpInvokerOutput" url="http://somehost/test"/> <httpinvoker-handler id="httpTarget" channel="httpInvokerOutput" url="http://somehost/test"/>