diff --git a/src/reference/asciidoc/endpoint.adoc b/src/reference/asciidoc/endpoint.adoc index c916fd4377..72bbecb15c 100644 --- a/src/reference/asciidoc/endpoint.adoc +++ b/src/reference/asciidoc/endpoint.adoc @@ -371,6 +371,7 @@ The following example shows how to define an `advice-chain` for a `poller`: ---- +==== For more information on how to implement the `MethodInterceptor` interface, see the https://docs.spring.io/spring/docs/current/spring-framework-reference/core.html#aop-api[AOP sections of the Spring Framework Reference Guide]. An advice chain can also be applied on a poller that does not have any transaction configuration, letting you enhance the behavior of the message flow initiated by the poller. diff --git a/src/reference/asciidoc/gateway.adoc b/src/reference/asciidoc/gateway.adoc index 7bab7a8650..e2da845105 100644 --- a/src/reference/asciidoc/gateway.adoc +++ b/src/reference/asciidoc/gateway.adoc @@ -693,7 +693,7 @@ MyCompletableFuture order(Order order); `CompletableFuture` instances can be used to perform additional manipulation on the reply, as the following example shows: -=== +==== [source, java] ---- CompletableFuture process(String data); diff --git a/src/reference/asciidoc/handler-advice.adoc b/src/reference/asciidoc/handler-advice.adoc index f0dbb30880..1c54261178 100644 --- a/src/reference/asciidoc/handler-advice.adoc +++ b/src/reference/asciidoc/handler-advice.adoc @@ -708,6 +708,7 @@ When the entire handler is advised (such as when the handler does not produce re ---- String componentName = ((NamedComponent) target).getComponentName(); ---- +==== When you implement `MethodInterceptor` directly, you could cast the target object as follows: @@ -852,7 +853,6 @@ public IntegrationFlow flow() { ... } ---- -==== NOTE: The `IdempotentReceiverInterceptor` is designed only for the `MessageHandler.handleMessage(Message)` method. Starting with version 4.3.1, it implements `HandleMessageAdvice`, with the `AbstractHandleMessageAdvice` as a base class, for better dissociation. diff --git a/src/reference/asciidoc/ip.adoc b/src/reference/asciidoc/ip.adoc index 8f5ca1c6d3..4b437ef2dd 100644 --- a/src/reference/asciidoc/ip.adoc +++ b/src/reference/asciidoc/ip.adoc @@ -1417,13 +1417,15 @@ In that case, it defaults to the default reply timeout (10 seconds). | Y | Y | -| See `java.net.Socket.setSendBufferSize()`. +| See `java.net.Socket.` +`setSendBufferSize()`. | `so-receive-buffer-size` | Y | Y | -| See `java.net.Socket.setReceiveBufferSize()`. +| See `java.net.Socket.` +`setReceiveBufferSize()`. | `so-keep-alive` | Y @@ -1448,7 +1450,8 @@ See `java.net.Socket.setSoLinger()`. | Y | Y | -| See `java.net.Socket.setTrafficClass()`. +| See `java.net.Socket.` +`setTrafficClass()`. | `local-address` | N @@ -1610,7 +1613,7 @@ Default: `true`. The following table describes attributes that you can set to configure UDP outbound channel adapters: .UDP Outbound Channel Adapter Attributes -[cols="1,^1,4", options="header"] +[cols="2,^1,4", options="header"] |=== | Attribute Name | Allowed Values @@ -1701,7 +1704,7 @@ outgoing UDP packets. The following table describes attributes that you can set to configure TCP inbound channel adapters: .TCP Inbound Channel Adapter Attributes -[cols="1,^1,4", options="header"] +[cols="2,^1,4", options="header"] |=== | Attribute Name | Allowed Values @@ -1742,7 +1745,7 @@ See "`<>`". The following table describes attributes that you can set to configure TCP outbound channel adapters: .TCP Outbound Channel Adapter Attributes -[cols="1,^1,4", options="header"] +[cols="2,^1,4", options="header"] |=== | Attribute Name | Allowed Values @@ -1780,7 +1783,7 @@ See "`<>`". The following table describes attributes that you can set to configure TCP inbound gateways: .TCP Inbound Gateway Attributes -[cols="1,^1,4", options="header"] +[cols="2,^1,4", options="header"] |=== | Attribute Name | Allowed Values @@ -1832,7 +1835,7 @@ The following table describes attributes that you can set to configure TCP outbo [[tcp-ob-gateway-attributes]] .TCP Outbound Gateway Attributes -[cols="1,^1,4", options="header"] +[cols="2,^1,4", options="header"] |=== | Attribute Name | Allowed Values @@ -1879,7 +1882,7 @@ Only applies if the reply-channel might block (such as a bounded QueueChannel th This module uses the following `MessageHeader` instances: -[cols="2,2,4", options="header"] +[cols="3,3,4", options="header"] |=== | Header Name | IpHeaders Constant @@ -1928,7 +1931,8 @@ When sending to a server-side inbound channel adapter or replying to an inbound When using a cached or failover client connection factory, it contains the actual underlying connection ID. | `contentType` -| `MessageHeaders.CONTENT_TYPE` +| `MessageHeaders.` +`CONTENT_TYPE` | An optional content type for inbound messages Described after this table. Note that, unlike the other header constants, this constant is in the `MessageHeaders` class, not the `IpHeaders` class. diff --git a/src/reference/asciidoc/jdbc.adoc b/src/reference/asciidoc/jdbc.adoc index 68e1d0cad2..41cc97991a 100644 --- a/src/reference/asciidoc/jdbc.adoc +++ b/src/reference/asciidoc/jdbc.adoc @@ -953,7 +953,7 @@ The following listing shows the corresponding SQL: ---- CREATE PROCEDURE FIND_ALL_COFFEE_BEVERAGES() \ PARAMETER STYLE JAVA LANGUAGE JAVA MODIFIES SQL DATA DYNAMIC RESULT SETS 1 \ -EXTERNAL NAME 'org.springframework.integration.jdbc.storedproc.derby.DerbyStoredProcedures.findAllCoffeeBeverages'; +EXTERNAL NAME 'o.s.i.jdbc.storedproc.derby.DerbyStoredProcedures.findAllCoffeeBeverages'; ---- ==== @@ -1063,7 +1063,7 @@ This `MetadataStore` implementation can be used with adapters such as the follow * <> * <> -To configure these adapters to use the `JdbcMetadataStore`, declare a Spring bean by using a bean name of `metadataStore`. +To configure these adapters to use the `JdbcMetadataStore`, declare a Spring bean by using a bean name of `metadataStore`. The Feed inbound channel adapter and the feed inbound channel adapter both automatically pick up and use the declared `JdbcMetadataStore`, as the following example shows: ==== diff --git a/src/reference/asciidoc/jmx.adoc b/src/reference/asciidoc/jmx.adoc index 4e68ce9692..bf93c9e7aa 100644 --- a/src/reference/asciidoc/jmx.adoc +++ b/src/reference/asciidoc/jmx.adoc @@ -390,12 +390,12 @@ Previously, beans of these types were exported as two distinct MBeans: + * The metrics MBean (with an object name such as `intDomain:type=MessageHandler,name=myRouter,bean=endpoint`). This MBean had metrics attributes and metrics/Lifecycle operations. -* A second MBean (with an object name such as `ctxDomain:name=org.springframework.integration.config.RouterFactoryBean#0,type=MethodInvokingRouter`) was exported with the channel mappings attribute and operations. +* A second MBean (with an object name such as `ctxDomain:name=org.springframework.integration.config.` `RouterFactoryBean#0`,type=MethodInvokingRouter`) was exported with the channel mappings attribute and operations. + Now the attributes and operations are consolidated into a single MBean. The object name depends on the exporter. If exported by the integration MBean exporter, the object name is, for example: `intDomain:type=MessageHandler,name=myRouter,bean=endpoint`. -If exported by another exporter, the object name is, for example: `ctxDomain:name=org.springframework.integration.config.RouterFactoryBean#0,type=MethodInvokingRouter`. +If exported by another exporter, the object name is, for example: `ctxDomain:name=org.springframework.integration.config.` `RouterFactoryBean#0,type=MethodInvokingRouter`. There is no difference between these MBeans (aside from the object name), except that the statistics are not enabled (the attributes are `0`) by exporters other than the integration exporter. You can enable statistics at runtime by using the JMX operations. When exported by the integration MBean exporter, the initial state can be managed as described earlier. diff --git a/src/reference/asciidoc/jpa.adoc b/src/reference/asciidoc/jpa.adoc index 9b6f97ec20..97a70ce0dc 100644 --- a/src/reference/asciidoc/jpa.adoc +++ b/src/reference/asciidoc/jpa.adoc @@ -589,6 +589,7 @@ The following example shows how to do so: public class Student { ... +} ---- ==== @@ -989,6 +990,7 @@ public class JpaJavaApplication { The following example shows all the attributes that you can set on a retrieving outbound gateway and describes the key attributes: +==== [source,xml] ---- diff --git a/src/reference/asciidoc/mail.adoc b/src/reference/asciidoc/mail.adoc index f9172e39c7..cc08482d08 100644 --- a/src/reference/asciidoc/mail.adoc +++ b/src/reference/asciidoc/mail.adoc @@ -70,8 +70,10 @@ The next section has examples of configuring both types of inbound channel adapt [IMPORTANT] ==== Normally, when the `IMAPMessage.getContent()` method is called, certain headers as well as the body are rendered (for a simple text email), as the following example shows: +==== ==== +--- [source] ---- To: thing1@things.com @@ -92,7 +94,6 @@ Starting with version 5.0, messages originating from an IMAP source render the c If you do not use a header mapper and you wish to revert to the previous behavior of rendering only the body, set the `simpleContent` boolean property on the mail receiver to `true`. This property now controls the rendering regardless of whether a header mapper is used. It now allows body-only rendering when a header mapper is provided. -==== [[mail-mapping]] === Inbound Mail Message Mapping diff --git a/src/reference/asciidoc/message.adoc b/src/reference/asciidoc/message.adoc index 1a6416d7ce..5bac92d409 100644 --- a/src/reference/asciidoc/message.adoc +++ b/src/reference/asciidoc/message.adoc @@ -80,18 +80,25 @@ The following table describes the pre-defined message headers: | An identifier for this message instance. Changes each time a message is mutated. -| `MessageHeaders.TIMESTAMP` +| `MessageHeaders. +TIMESTAMP` | java.lang.Long | The time the message was created. Changes each time a message is mutated. -| `MessageHeaders.REPLY_CHANNEL` -| `java.lang.Object` (`String` or `MessageChannel`) +| `MessageHeaders. +REPLY_CHANNEL` +| `java.lang.Object` +(`String` or +`MessageChannel`) | A channel to which a reply (if any) is sent when no explicit output channel is configured and there is no `ROUTING_SLIP` or the `ROUTING_SLIP` is exhausted. If the value is a `String`, it must represent a bean name or have been generated by a `ChannelRegistry.` -| MessageHeaders.ERROR_CHANNEL -| `java.lang.Object` (`String` or `MessageChannel`) +| MessageHeaders. +ERROR_CHANNEL +| `java.lang.Object` +(`String` or +`MessageChannel`) | A channel to which errors are sent. If the value is a `String`, it must represent a bean name or have been generated by a `ChannelRegistry.` |=== @@ -113,44 +120,56 @@ The following table describes the pre-defined message headers: | Header Type | Usage -| `IntegrationMessageHeaderAccessor.CORRELATION_ID` +| `IntegrationMessageHeaderAccessor. +CORRELATION_ID` | `java.lang.Object` | Used to correlate two or more messages. -| `IntegrationMessageHeaderAccessor.SEQUENCE_NUMBER` +| `IntegrationMessageHeaderAccessor. +SEQUENCE_NUMBER` | `java.lang.Integer` | Usually a sequence number with a group of messages with a `SEQUENCE_SIZE` but can also be used in a `` to resequence an unbounded group of messages. -| `IntegrationMessageHeaderAccessor.SEQUENCE_SIZE` +| `IntegrationMessageHeaderAccessor. +SEQUENCE_SIZE` | `java.lang.Integer` | The number of messages within a group of correlated messages. -| `IntegrationMessageHeaderAccessor.EXPIRATION_DATE` +| `IntegrationMessageHeaderAccessor. +EXPIRATION_DATE` | `java.lang.Long` | Indicates when a message is expired. Not used by the framework directly but can be set with a header enricher and used in a `` that is configured with an `UnexpiredMessageSelector`. -| `IntegrationMessageHeaderAccessor.PRIORITY` +| `IntegrationMessageHeaderAccessor. +PRIORITY` | `java.lang.Integer` | Message priority -- for example, within a `PriorityChannel`. -| `IntegrationMessageHeaderAccessor.DUPLICATE_MESSAGE` +| `IntegrationMessageHeaderAccessor. +DUPLICATE_MESSAGE` | `java.lang.Boolean` | True if a message was detected as a duplicate by an idempotent receiver interceptor. See "`<>`". -| `IntegrationMessageHeaderAccessor.CLOSEABLE_RESOURCE` +| `IntegrationMessageHeaderAccessor. +CLOSEABLE_RESOURCE` | `java.io.Closeable` | This header is present if the message is associated with a `Closeable` that should be closed when message processing is complete. An example is the `Session` associated with a streamed file transfer using FTP, SFTP, and so on. -| `IntegrationMessageHeaderAccessor.DELIVERY_ATTEMPT` -| `java.lang.AtomicInteger` +| `IntegrationMessageHeaderAccessor. +DELIVERY_ATTEMPT` +| `java.lang.` +`AtomicInteger` | If a message-driven channel adapter supports the configuration of a `RetryTemplate`, this header contains the current delivery attempt. -| `IntegrationMessageHeaderAccessor.ACKNOWLEDGMENT_CALLBACK` -| `o.s.i.support.AcknowledgmentCallback` +| `IntegrationMessageHeaderAccessor. +ACKNOWLEDGMENT_CALLBACK` +| `o.s.i.support.` +`Acknowledgment` +`Callback` | If a message source supports it, a call back to accept, reject, or requeue a message. See "`<>`". |=== @@ -176,12 +195,16 @@ The following table describes headers that also appear in the `IntegrationMessag | Header Type | Usage -| `IntegrationMessageHeaderAccessor.SEQUENCE_DETAILS` -| `java.util.List>` +| `IntegrationMessageHeaderAccessor. +SEQUENCE_DETAILS` +| `java.util.` +`List>` | A stack of correlation data used when nested correlation is needed (for example, `splitter->...->splitter->...->aggregator->...->aggregator`). -| `IntegrationMessageHeaderAccessor.ROUTING_SLIP` -| `java.util.Map, Integer>` +| `IntegrationMessageHeaderAccessor. +ROUTING_SLIP` +| `java.util.` +`Map, Integer>` | See "`<>`". |=== diff --git a/src/reference/asciidoc/sftp.adoc b/src/reference/asciidoc/sftp.adoc index 050293fbb1..eaf2cd5d68 100644 --- a/src/reference/asciidoc/sftp.adoc +++ b/src/reference/asciidoc/sftp.adoc @@ -1108,7 +1108,7 @@ You can provide one of these filters by using the `filter` property on the gatew See also "`<>`". [[sftp-put-command]] -====Using the `put` Command +==== Using the `put` Command `put` sends a file to the remote server. The payload of the message can be a `java.io.File`, a `byte[]`, or a `String`. diff --git a/src/reference/asciidoc/stomp.adoc b/src/reference/asciidoc/stomp.adoc index 8628b59edf..8b82c4c355 100644 --- a/src/reference/asciidoc/stomp.adoc +++ b/src/reference/asciidoc/stomp.adoc @@ -195,6 +195,7 @@ To include it in your configuration, provide the following namespace declaration The following listing shows the available attributes for the STOMP outbound channel adapter: +==== [source,xml] ---- ---- -=== +==== This document does not declare a namespace. Therefore, applying the following XPath Expression works as expected: