Fix HTTP urls to HTTPS

* Do not fix urls for the `http://apache.org/xml/features` when we
configure XML components
* Do not fix urls for localhost and fake links in tests
* Fix all the dead links in docs
This commit is contained in:
Artem Bilan
2019-03-21 17:13:41 -04:00
parent 0ce6216e49
commit 20e8f0af2f
130 changed files with 716 additions and 712 deletions

View File

@@ -594,7 +594,7 @@ NOTE: Wherever it makes sense to do so, the release strategy method, the correla
[[aggregator-spel]]
====== Aggregators and Spring Expression Language (SpEL)
Since Spring Integration 2.0, you can handle the various strategies (correlation, release, and aggregation) with http://docs.spring.io/spring/docs/current/spring-framework-reference/html/expressions.html[SpEL], which we recommend if the logic behind such a release strategy is relatively simple.
Since Spring Integration 2.0, you can handle the various strategies (correlation, release, and aggregation) with https://docs.spring.io/spring/docs/current/spring-framework-reference/core.html#expressions[SpEL], which we recommend if the logic behind such a release strategy is relatively simple.
Suppose you have a legacy component that was designed to receive an array of objects.
We know that the default release strategy assembles all aggregated messages in the `List`.
Now we have two problems.
@@ -627,7 +627,7 @@ The following example shows how to do so:
----
====
In the preceding configuration, we use a http://docs.spring.io/spring/docs/current/spring-framework-reference/html/expressions.html#expressions-collection-projection[collection projection] expression to assemble a new collection from the payloads of all the messages in the list and then transform it to an array, thus achieving the same result as the earlier Java code.
In the preceding configuration, we use a https://docs.spring.io/spring/docs/current/spring-framework-reference/core.html#expressions[collection projection] expression to assemble a new collection from the payloads of all the messages in the list and then transform it to an array, thus achieving the same result as the earlier Java code.
You can apply the same expression-based approach when dealing with custom release and correlation strategies.
@@ -792,7 +792,7 @@ public interface MessageGroupStore {
----
====
For more information, see the http://docs.spring.io/spring-integration/api/org/springframework/integration/store/MessageGroupStore.html[Javadoc].
For more information, see the https://docs.spring.io/spring-integration/api/org/springframework/integration/store/MessageGroupStore.html[Javadoc].
The `MessageGroupStore` accumulates state information in `MessageGroups` while waiting for a release strategy to be triggered, and that event might not ever happen.
So, to prevent stale messages from lingering, and for volatile stores to provide a hook for cleaning up when the application shuts down, the `MessageGroupStore` lets you register callbacks to apply to its `MessageGroups` when they expire.

View File

@@ -33,13 +33,13 @@ The following adapters are available:
Spring Integration also provides a point-to-point message channel and a publish-subscribe message channel backed by AMQP Exchanges and Queues.
To provide AMQP support, Spring Integration relies on (http://projects.spring.io/spring-amqp[Spring AMQP]), which applies core Spring concepts to the development of AMQP-based messaging solutions.
Spring AMQP provides similar semantics to (http://docs.spring.io/spring/docs/current/spring-framework-reference/html/jms.html[Spring JMS]).
To provide AMQP support, Spring Integration relies on (https://projects.spring.io/spring-amqp[Spring AMQP]), which applies core Spring concepts to the development of AMQP-based messaging solutions.
Spring AMQP provides similar semantics to (https://docs.spring.io/spring/docs/current/spring-framework-reference/integration.html#jms[Spring JMS]).
Whereas the provided AMQP Channel Adapters are intended for unidirectional messaging (send or receive) only, Spring Integration also provides inbound and outbound AMQP gateways for request-reply operations.
TIP:
You should familiarize yourself with the http://docs.spring.io/spring-amqp/reference/html/[reference documentation of the Spring AMQP project].
You should familiarize yourself with the https://docs.spring.io/spring-amqp/reference/html/[reference documentation of the Spring AMQP project].
It provides much more in-depth information about Spring's integration with AMQP in general and RabbitMQ in particular.
[[amqp-inbound-channel-adapter]]
@@ -159,7 +159,7 @@ The transaction manager works in conjunction with the `channel-transacted` attri
If there is already a transaction in progress when the framework is sending or receiving a message and the `channelTransacted` flag is `true`, the commit or rollback of the messaging transaction is deferred until the end of the current transaction.
If the `channelTransacted` flag is `false`, no transaction semantics apply to the messaging operation (it is auto-acked).
For further information, see
http://docs.spring.io/spring-amqp/reference/html/%5Freference.html#%5Ftransactions[Transactions with Spring AMQP].
https://docs.spring.io/spring-amqp/reference/html/%255Freference.html#%5Ftransactions[Transactions with Spring AMQP].
Optional.
<25> Tells the `SimpleMessageListenerContainer` how many messages to process in a single transaction (if the channel is transactional).
For best results, it should be less than or equal to the value set in `prefetch-count`.
@@ -1178,12 +1178,12 @@ Note that RabbitMQ https://www.rabbitmq.com/validated-user-id.html[validates tha
To configure a default user ID for outbound messages, configure it on a `RabbitTemplate` and configure the outbound adapter or gateway to use that template.
Similarly, to set the user ID property on replies, inject an appropriately configured template into the inbound gateway.
See the http://docs.spring.io/spring-amqp/reference/html/_reference.html#template-user-id[Spring AMQP documentation] for more information.
See the https://docs.spring.io/spring-amqp/reference/html/_reference.html#template-user-id[Spring AMQP documentation] for more information.
[[amqp-delay]]
=== Delayed Message Exchange
Spring AMQP supports the http://docs.spring.io/spring-amqp/reference/html/_reference.html#delayed-message-exchange[RabbitMQ Delayed Message Exchange Plugin].
Spring AMQP supports the https://docs.spring.io/spring-amqp/reference/html/#delayed-message-exchange[RabbitMQ Delayed Message Exchange Plugin].
For inbound messages, the `x-delay` header is mapped to the `AmqpHeaders.RECEIVED_DELAY` header.
Setting the `AMQPHeaders.DELAY` header causes the corresponding `x-delay` header to be set in outbound messages.
You can also specify the `delay` and `delayExpression` properties on outbound endpoints (`delay-expression` when using XML configuration).
@@ -1341,11 +1341,11 @@ public IntegrationFlow pubSubInFlow(ConnectionFactory connectionFactory) {
The Spring Integration AMQP Adapters automatically map all AMQP properties and headers.
(This is a change from 4.3 - previously, only standard headers were mapped).
By default, these properties are copied to and from Spring Integration `MessageHeaders` by using the
http://docs.spring.io/spring-integration/api/org/springframework/integration/amqp/support/DefaultAmqpHeaderMapper.html[`DefaultAmqpHeaderMapper`].
https://docs.spring.io/spring-integration/api/org/springframework/integration/amqp/support/DefaultAmqpHeaderMapper.html[`DefaultAmqpHeaderMapper`].
You can pass in your own implementation of AMQP-specific header mappers, as the adapters have properties to support doing so.
Any user-defined headers within the AMQP http://docs.spring.io/spring-amqp/api/org/springframework/amqp/core/MessageProperties.html[`MessageProperties`] are copied to or from an AMQP message, unless explicitly negated by the `requestHeaderNames` or `replyHeaderNames` properties of the `DefaultAmqpHeaderMapper`.
Any user-defined headers within the AMQP https://docs.spring.io/spring-amqp/api/org/springframework/amqp/core/MessageProperties.html[`MessageProperties`] are copied to or from an AMQP message, unless explicitly negated by the `requestHeaderNames` or `replyHeaderNames` properties of the `DefaultAmqpHeaderMapper`.
By default, for an outbound mapper, no `x-*` headers are mapped.
See the <<header-copy-caution,caution>> that appears later in this section for why.
@@ -1496,11 +1496,11 @@ IMPORTANT: There must be no thread handoffs in the downstream flow (`QueueChanne
To experiment with the AMQP adapters, check out the samples available in the Spring Integration samples git repository at https://github.com/spring-projects/spring-integration-samples[https://github.com/SpringSource/spring-integration-samples]
Currently, one sample demonstrates the basic functionality of the Spring Integration AMQP adapter by using an outbound channel adapter and an inbound channel adapter.
As AMQP broker implementation in the sample uses http://www.rabbitmq.com/[RabbitMQ].
As AMQP broker implementation in the sample uses https://www.rabbitmq.com/[RabbitMQ].
NOTE: In order to run the example, you need a running instance of RabbitMQ.
A local installation with just the basic defaults suffices.
For detailed RabbitMQ installation procedures, see http://www.rabbitmq.com/install.html[http://www.rabbitmq.com/install.html]
For detailed RabbitMQ installation procedures, see https://www.rabbitmq.com/install.html[https://www.rabbitmq.com/install.html]
Once the sample application is started, enter some text on the command prompt and a message containing that entered text is dispatched to the AMQP queue.
In return, that message is retrieved by Spring Integration and printed to the console.

View File

@@ -4,7 +4,7 @@
The `MessageHandlerChain` is an implementation of `MessageHandler` that can be configured as a single message endpoint while actually delegating to a chain of other handlers, such as filters, transformers, splitters, and so on.
When several handlers need to be connected in a fixed, linear progression, this can lead to a much simpler configuration.
For example, it is fairly common to provide a transformer before other components.
Similarly, when you provide a filter before some other component in a chain, you essentially create a http://www.eaipatterns.com/MessageSelector.html[selective consumer].
Similarly, when you provide a filter before some other component in a chain, you essentially create a https://www.enterpriseintegrationpatterns.com/MessageSelector.html[selective consumer].
In either case, the chain requires only a single `input-channel` and a single `output-channel`, eliminating the need to define channels for each individual component.
TIP: Spring Integration's `Filter` provides a boolean property: `throwExceptionOnRejection`.

View File

@@ -17,7 +17,7 @@ This guide includes many samples.
[[conversion-support]]
===== Conversion Service and Converter
You can now benefit from the conversion service support provided with Spring while configuring many Spring Integration components, such as a http://www.eaipatterns.com/DatatypeChannel.html[Datatype channel].
You can now benefit from the conversion service support provided with Spring while configuring many Spring Integration components, such as a https://www.enterpriseintegrationpatterns.com/DatatypeChannel.html[Datatype channel].
See <<channel-implementations>> and <<service-activator-introduction>>.
Also, the SpEL support mentioned in the previous point also relies upon the conversion service.
Therefore, you can register converters once and take advantage of them anywhere you use SpEL expressions.
@@ -42,18 +42,18 @@ See <<http-outbound>> for more details.
[[new-eip]]
==== Enterprise Integration Pattern Additions
Also in 2.0, we have added support for even more of the patterns described in Hohpe and Woolf's http://www.eaipatterns.com/[Enterprise Integration Patterns] book.
Also in 2.0, we have added support for even more of the patterns described in Hohpe and Woolf's https://www.enterpriseintegrationpatterns.com/[Enterprise Integration Patterns] book.
[[new-message-history]]
===== Message History
We now provide support for the http://www.eaipatterns.com/MessageHistory.html[message history] pattern, letting you keep track of all traversed components, including the name of each channel and endpoint as well as the timestamp of that traversal.
We now provide support for the https://www.enterpriseintegrationpatterns.com/MessageHistory.html[message history] pattern, letting you keep track of all traversed components, including the name of each channel and endpoint as well as the timestamp of that traversal.
See <<message-history>> for more details.
[[new-message-store]]
===== Message Store
We now provide support for the http://www.eaipatterns.com/MessageStore.html[message store] pattern.
We now provide support for the https://www.enterpriseintegrationpatterns.com/MessageStore.html[message store] pattern.
The message store provides a strategy for persisting messages on behalf of any process whose scope extends beyond a single transaction, such as the aggregator and the resequencer.
Many sections of this guide include samples of how to use a message store, as it affects several areas of Spring Integration.
See <<message-store>>, <<claim-check>>, <<channel>>, <<aggregator>>, <<jdbc>>`", and <<resequencer>> for more details.
@@ -61,7 +61,7 @@ See <<message-store>>, <<claim-check>>, <<channel>>, <<aggregator>>, <<jdbc>>`",
[[new-claim-check]]
===== Claim Check
We have added an implementation of the http://www.eaipatterns.com/StoreInLibrary.html[claim check] pattern.
We have added an implementation of the https://www.enterpriseintegrationpatterns.com/StoreInLibrary.html[claim check] pattern.
The idea behind the claim check pattern is that you can exchange a message payload for a "`claim ticket`".
This lets you reduce bandwidth and avoid potential security issues when sending messages across channels.
See <<claim-check>> for more details.
@@ -69,7 +69,7 @@ See <<claim-check>> for more details.
[[new-control-bus]]
===== Control Bus
We have provided implementations of the http://www.eaipatterns.com/ControlBus.html[control bus] pattern, which lets you use messaging to manage and monitor endpoints and channels.
We have provided implementations of the https://www.enterpriseintegrationpatterns.com/ControlBus.html[control bus] pattern, which lets you use messaging to manage and monitor endpoints and channels.
The implementations include both a SpEL-based approach and one that runs Groovy scripts.
See <<control-bus>> and <<groovy-control-bus>> for more details.
@@ -83,7 +83,7 @@ We have added several new channel adapters and messaging gateways in Spring Inte
We have added channel adapters for receiving and sending messages over the TCP and UDP internet protocols.
See <<ip>> for more details.
See also the following blog: http://blog.springsource.com/2010/03/29/using-udp-and-tcp-adapters-in-spring-integration-2-0-m3/["`Using UDP and TCP Adapters in Spring Integration 2.0 M3`"].
See also the following blog: https://spring.io/blog/2010/03/29/using-udp-and-tcp-adapters-in-spring-integration-2-0-m3/["`Using UDP and TCP Adapters in Spring Integration 2.0 M3`"].
[[new-twitter]]
===== Twitter Adapters
@@ -159,18 +159,18 @@ We restructured some packaging to provide the flexibility we needed for extendin
==== New Source Control Management and Build Infrastructure
With Spring Integration 2.0, we switched our build environment to use Git for source control.
To access our repository, visit http://git.springsource.org/spring-integration.
We have also switched our build system to http://gradle.org/[Gradle].
To access our repository, visit https://git.springsource.org/spring-integration.
We have also switched our build system to https://gradle.org/[Gradle].
[[new-samples]]
==== New Spring Integration Samples
With Spring Integration 2.0, we have decoupled the samples from our main release distribution.
Please read the following blog to get more information: http://blog.springsource.com/2010/09/29/new-spring-integration-samples/[New Spring Integration Samples].
Please read the following blog to get more information: https://spring.io/blog/2010/09/29/new-spring-integration-samples/[New Spring Integration Samples].
We have also created many new samples, including samples for every new adapter.
[[new-sts]]
==== Spring Tool Suite Visual Editor for Spring Integration
There is an amazing new visual editor for Spring Integration included within the latest version of SpringSource Tool Suite.
If you are not already using STS, you can download it athttps://spring.io/tools/sts[Spring Tool Suite].
If you are not already using STS, you can download it at https://spring.io/tools/sts[Spring Tool Suite].

View File

@@ -11,8 +11,8 @@ Version 2.1 added a number of new components.
[[x2.1-new-scripting-support]]
===== JSR-223 Scripting Support
In Spring Integration 2.0, we added support for http://groovy.codehaus.org/[Groovy].
With Spring Integration 2.1, we expanded support for additional languages substantially by implementing support for http://www.jcp.org/en/jsr/detail?id=223[JSR-223] ("`Scripting for the Java™ Platform`").
In Spring Integration 2.0, we added support for https://groovy.codehaus.org/[Groovy].
With Spring Integration 2.1, we expanded support for additional languages substantially by implementing support for https://www.jcp.org/en/jsr/detail?id=223[JSR-223] ("`Scripting for the Java™ Platform`").
Now you have the ability to use any scripting language that supports JSR-223 including:
* Javascript
@@ -25,15 +25,15 @@ For further details, see <<scripting>>.
[[x2.1-new-gemfire-support]]
===== GemFire Support
Spring Integration provides support for http://www.vmware.com/products/application-platform/vfabric-gemfire/overview.html[GemFire] by providing inbound adapters for entry and continuous query events, an outbound adapter to write entries to the cache, and http://static.springsource.org/spring-integration/api/org/springframework/integration/store/MessageStore.html[`MessageStore`] and http://static.springsource.org/spring-integration/api/org/springframework/integration/store/MessageGroupStore.html[`MessageGroupStore`] implementations.
Spring integration leverages the http://www.springsource.org/spring-gemfire[Spring Gemfire] project, providing a thin wrapper over its components.
Spring Integration provides support for https://www.vmware.com/products/pivotal-gemfire.html[GemFire] by providing inbound adapters for entry and continuous query events, an outbound adapter to write entries to the cache, and https://docs.spring.io/spring-integration/api/org/springframework/integration/store/MessageStore.html[`MessageStore`] and https://docs.spring.io/spring-integration/api/org/springframework/integration/store/MessageGroupStore.html[`MessageGroupStore`] implementations.
Spring integration leverages the https://spring.io/projects/spring-data-gemfire[Spring Gemfire] project, providing a thin wrapper over its components.
For further details, see <<gemfire>>.
[[x2.1-new-amqp-support]]
===== AMQP Support
Spring Integration 2.1 added several channel adapters for receiving and sending messages by using the http://www.amqp.org/[Advanced Message Queuing Protocol] (AMQP).
Spring Integration 2.1 added several channel adapters for receiving and sending messages by using the https://www.amqp.org/[Advanced Message Queuing Protocol] (AMQP).
Furthermore, Spring Integration also provides a point-to-point message channel and a publish-subscribe message channel, both of which are backed by AMQP Exchanges and Queues.
For further details, see <<amqp>>.
@@ -41,14 +41,14 @@ For further details, see <<amqp>>.
[[x2.1-new-mongodb-support]]
===== MongoDB Support
As of version 2.1, Spring Integration provides support for http://www.mongodb.org/[MongoDB] by providing a MongoDB-based `MessageStore`.
As of version 2.1, Spring Integration provides support for https://www.mongodb.org/[MongoDB] by providing a MongoDB-based `MessageStore`.
For further details, see <<mongodb>>.
[[x2.1-new-redis-support]]
===== Redis Support
As of version 2.1, Spring Integration supports http://redis.io/[Redis], an advanced key-value store, by providing a Redis-based `MessageStore` as well as publish-subscribe messaging adapters.
As of version 2.1, Spring Integration supports https://redis.io/[Redis], an advanced key-value store, by providing a Redis-based `MessageStore` as well as publish-subscribe messaging adapters.
For further details, see <<redis>>.
@@ -64,7 +64,7 @@ For further details, see <<resource-inbound-channel-adapter>>.
===== Stored Procedure Components
With Spring Integration 2.1, the `JDBC` Module also provides stored procedure support by adding several new components, including inbound and outbound channel adapters and an outbound gateway.
The stored procedure support leverages Spring's http://static.springsource.org/spring/docs/3.0.x/javadoc-api/org/springframework/jdbc/core/simple/SimpleJdbcCall.html[`SimpleJdbcCall`] class and consequently supports stored procedures for:
The stored procedure support leverages Spring's https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/jdbc/core/simple/SimpleJdbcCall.html[`SimpleJdbcCall`] class and consequently supports stored procedures for:
* Apache Derby
* DB2
@@ -97,7 +97,7 @@ For more details, see <<xml-xpath-filter>> and <<xml-validating-filter>>.
===== Payload Enricher
Since Spring Integration 2.1, we added the payload enricher.
A payload enricher defines an endpoint that typically passes a http://static.springsource.org/spring-integration/api/org/springframework/integration/Message.html[`Message`] to the exposed request channel and then expects a reply message.
A payload enricher defines an endpoint that typically passes a https://docs.spring.io/spring-integration/api/org/springframework/integration/Message.html[`Message`] to the exposed request channel and then expects a reply message.
The reply message then becomes the root object for evaluation of expressions to enrich the target payload.
For further details, see <<payload-enricher>>.
@@ -164,9 +164,9 @@ The following example declares a version-less Spring Integration namespace:
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:int="http://www.springframework.org/schema/integration"
xsi:schemaLocation="http://www.springframework.org/schema/integration
http://www.springframework.org/schema/integration/spring-integration.xsd
https://www.springframework.org/schema/integration/spring-integration.xsd
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd">
https://www.springframework.org/schema/beans/spring-beans.xsd">
...
</beans>
----
@@ -182,9 +182,9 @@ The following example declares a Spring Integration namespace with an explicit v
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:int="http://www.springframework.org/schema/integration"
xsi:schemaLocation="http://www.springframework.org/schema/integration
http://www.springframework.org/schema/integration/spring-integration-2.2.xsd
https://www.springframework.org/schema/integration/spring-integration-2.2.xsd
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd">
https://www.springframework.org/schema/beans/spring-beans.xsd">
...
</beans>
----
@@ -202,8 +202,8 @@ This section covers those changes.
[[x2.1-move-to-github]]
===== Source Code Now Hosted on Github
Since version 2.0, the Spring Integration project uses http://git-scm.com/[Git] for version control.
To increase community visibility even further, the project was moved from SpringSource hosted Git repositories to http://www.github.com/[Github].
Since version 2.0, the Spring Integration project uses https://git-scm.com/[Git] for version control.
To increase community visibility even further, the project was moved from SpringSource hosted Git repositories to https://www.github.com/[Github].
The Spring Integration Git repository is located at: https://github.com/spring-projects/spring-integration[spring-integration].
For the project, we also improved the process of providing code contributions.
@@ -214,7 +214,7 @@ For more details, see https://github.com/spring-projects/spring-integration/blob
[[x2.1-sonar]]
===== Improved Source Code Visibility with Sonar
In an effort to provide better source code visibility and consequently to monitor the quality of Spring Integration's source code, we set up an instance of http://www.sonarsource.org/[Sonar].
In an effort to provide better source code visibility and consequently to monitor the quality of Spring Integration's source code, we set up an instance of https://www.sonarqube.org/[Sonar].
We gather metrics nightly and make them available at https://sonar.spring.io/dashboard?id=org.springframework.integration%3Aspring-integration%3Amaster[sonar.spring.io].
[[x2.1-new-samples]]

View File

@@ -42,7 +42,7 @@ For more information, see <<spel-property-accessors>>.
[[x3.0-redis-new-components]]
===== Redis: New Components
We added a new Redis-based http://docs.spring.io/spring-integration/docs/latest-ga/api/org/springframework/integration/store/MetadataStore.html[`MetadataStore`] implementation.
We added a new Redis-based https://docs.spring.io/spring-integration/api/org/springframework/integration/metadata/MetadataStore.html[`MetadataStore`] implementation.
You can use the `RedisMetadataStore` to maintain the state of a `MetadataStore` across application restarts.
This new `MetadataStore` implementation can be used with adapters, such as:
@@ -361,7 +361,7 @@ For more information, see <<transformer>>.
[[x3.0-jpa-changes]]
===== JPA Support Changes
Payloads to persist or merge can now be of type `http://docs.oracle.com/javase/7/docs/api/java/lang/Iterable.html[java.lang.Iterable]`.
Payloads to persist or merge can now be of type `https://docs.oracle.com/javase/7/docs/api/java/lang/Iterable.html[java.lang.Iterable]`.
In that case, each object returned by the `Iterable` is treated as an entity and persisted or merged by using the underlying `EntityManager`.
Null values returned by the iterator are ignored.

View File

@@ -46,7 +46,7 @@ For more information, see <<messaging-gateway-annotation>>.
===== Spring Boot `@EnableAutoConfiguration`
As well as the `@EnableIntegration` annotation mentioned earlier, we introduced a hook to allow the Spring Integration infrastructure beans to be configured with Spring Boot's `@EnableAutoConfiguration` annotation.
For more information, see http://docs.spring.io/spring-boot/docs/current/reference/html/using-boot-auto-configuration.html["`Auto-configuration`"] in the Spring Boot Reference Guide.
For more information, see https://docs.spring.io/spring-boot/docs/current/reference/html/using-boot-auto-configuration.html["`Auto-configuration`"] in the Spring Boot Reference Guide.
[[x4.0-global-channel-interceptor]]
===== `@GlobalChannelInterceptor`

View File

@@ -287,12 +287,12 @@ See <<jdbc>> for more information.
==== Metrics Changes
http://micrometer.io/[Micrometer] application monitoring is now supported (since version 5.0.2).
https://micrometer.io/[Micrometer] application monitoring is now supported (since version 5.0.2).
See <<micrometer-integration>> for more information.
IMPORTANT: Changes were made to the Micrometer `Meters` in version 5.0.3 to make them more suitable for use in dimensional systems.
Further changes were made in 5.0.4.
If you usie Micrometer, we recommend a minimum of version 5.0.4.
If you use Micrometer, we recommend a minimum of version 5.0.4.
==== `@EndpointId` Annotations

View File

@@ -279,7 +279,7 @@ The reason for this is that when a `Message` is sent to a `SubscribableChannel`,
a `PublishSubscribeChannel` sends to all of its subscribers).
Therefore, the `preReceive(...)`, `postReceive(...)`, and `afterReceiveCompletion(...)` interceptor methods are invoked only when the interceptor is applied to a `PollableChannel`.
Spring Integration also provides an implementation of the http://eaipatterns.com/WireTap.html[Wire Tap] pattern.
Spring Integration also provides an implementation of the https://www.enterpriseintegrationpatterns.com/WireTap.html[Wire Tap] pattern.
It is a simple interceptor that sends the `Message` to another channel without otherwise altering the existing flow.
It can be very useful for debugging and monitoring.
An example is shown in <<channel-wiretap>>.
@@ -408,7 +408,7 @@ Sometimes, a consumer can process only a particular type of payload, forcing you
The first thing that comes to mind may be to use a message filter.
However, all that message filter can do is filter out messages that are not compliant with the requirements of the consumer.
Another way would be to use a content-based router and route messages with non-compliant data-types to specific transformers to enforce transformation and conversion to the required data type.
This would work, but a simpler way to accomplish the same thing is to apply the http://www.eaipatterns.com/DatatypeChannel.html[Datatype Channel] pattern.
This would work, but a simpler way to accomplish the same thing is to apply the https://www.enterpriseintegrationpatterns.com/DatatypeChannel.html[Datatype Channel] pattern.
You can use separate datatype channels for each specific payload data type.
To create a datatype channel that accepts only messages that contain a certain payload type, provide the data type's fully-qualified class name in the channel element's `datatype` attribute, as the following example shows:
@@ -429,7 +429,7 @@ Multiple types can be provided as a comma-delimited list, as the following examp
====
So the 'numberChannel' in the preceding example accepts only messages with a data type of `java.lang.Number`.
But what happens if the payload of the message is not of the required type? It depends on whether you have defined a bean named `integrationConversionService` that is an instance of Spring's http://static.springsource.org/spring/docs/current/spring-framework-reference/html/validation.html#core-convert-ConversionService-API[Conversion Service].
But what happens if the payload of the message is not of the required type? It depends on whether you have defined a bean named `integrationConversionService` that is an instance of Spring's https://docs.spring.io/spring/docs/current/spring-framework-reference/html/validation.html#core-convert-ConversionService-API[Conversion Service].
If not, then an `Exception` would be thrown immediately.
However, if you have defined an `integrationConversionService` bean, it is used in an attempt to convert the message's payload to the acceptable type.

View File

@@ -7,7 +7,7 @@ However, there are times when we want to hide data temporarily.
For example, in a distributed system, we may receive a message with a very large payload.
Some intermittent message processing steps may not need access to this payload and some may only need to access certain headers, so carrying the large message payload through each processing step may cause performance degradation, may produce a security risk, and may make debugging more difficult.
The http://www.eaipatterns.com/StoreInLibrary.html[store in library] (or claim check) pattern describes a mechanism that lets you store data in a well known place while maintaining only a pointer (a claim check) to where that data is located.
The https://www.enterpriseintegrationpatterns.com/StoreInLibrary.html[store in library] (or claim check) pattern describes a mechanism that lets you store data in a well known place while maintaining only a pointer (a claim check) to where that data is located.
You can pass that pointer around as the payload of a new message, thereby letting any component within the message flow get the actual data as soon as it needs it.
This approach is very similar to the certified mail process, where you get a claim check in your mailbox and then have to go to the post office to claim your actual package.
It is also the same idea as baggage claim after a flight or in a hotel.

View File

@@ -13,7 +13,7 @@ You can also use the API directly, but we expect most developers to choose one o
=== Namespace Support
You can configure Spring Integration components with XML elements that map directly to the terminology and concepts of enterprise integration.
In many cases, the element names match those of the http://www.eaipatterns.com[_Enterprise Integration Patterns_] book.
In many cases, the element names match those of the https://www.enterpriseintegrationpatterns.com/[_Enterprise Integration Patterns_] book.
To enable Spring Integration's core namespace support within your Spring configuration files, add the following namespace reference and schema mapping in your top-level 'beans' element:
@@ -25,9 +25,9 @@ To enable Spring Integration's core namespace support within your Spring configu
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
*xmlns:int="http://www.springframework.org/schema/integration"*
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
https://www.springframework.org/schema/beans/spring-beans.xsd
*http://www.springframework.org/schema/integration*
*http://www.springframework.org/schema/integration/spring-integration.xsd*">
*https://www.springframework.org/schema/integration/spring-integration.xsd*">
----
====
@@ -46,9 +46,9 @@ Alternatively, you can create configuration files that use the Spring Integratio
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:beans="http://www.springframework.org/schema/beans"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
https://www.springframework.org/schema/beans/spring-beans.xsd
*http://www.springframework.org/schema/integration*
*http://www.springframework.org/schema/integration/spring-integration.xsd*">
*https://www.springframework.org/schema/integration/spring-integration.xsd*">
----
====
@@ -77,19 +77,19 @@ For example, the following root element shows several of these namespace declara
xmlns:int-rmi="http://www.springframework.org/schema/integration/rmi"
xmlns:int-ws="http://www.springframework.org/schema/integration/ws"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
https://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/integration
http://www.springframework.org/schema/integration/spring-integration.xsd
https://www.springframework.org/schema/integration/spring-integration.xsd
http://www.springframework.org/schema/integration/file
http://www.springframework.org/schema/integration/file/spring-integration-file.xsd
https://www.springframework.org/schema/integration/file/spring-integration-file.xsd
http://www.springframework.org/schema/integration/jms
http://www.springframework.org/schema/integration/jms/spring-integration-jms.xsd
https://www.springframework.org/schema/integration/jms/spring-integration-jms.xsd
http://www.springframework.org/schema/integration/mail
http://www.springframework.org/schema/integration/mail/spring-integration-mail.xsd
https://www.springframework.org/schema/integration/mail/spring-integration-mail.xsd
http://www.springframework.org/schema/integration/rmi
http://www.springframework.org/schema/integration/rmi/spring-integration-rmi.xsd
https://www.springframework.org/schema/integration/rmi/spring-integration-rmi.xsd
http://www.springframework.org/schema/integration/ws
http://www.springframework.org/schema/integration/ws/spring-integration-ws.xsd">
https://www.springframework.org/schema/integration/ws/spring-integration-ws.xsd">
...
</beans>
----
@@ -113,7 +113,7 @@ IntegrationContextUtils.TASK_SCHEDULER_BEAN_NAME
----
====
By default, Spring Integration relies on an instance of `ThreadPoolTaskScheduler`, as described in the http://docs.spring.io/spring/docs/current/spring-framework-reference/html/scheduling.html[Task Execution and Scheduling] section of the Spring Framework reference manual.
By default, Spring Integration relies on an instance of `ThreadPoolTaskScheduler`, as described in the https://docs.spring.io/spring/docs/current/spring-framework-reference/integration.html#scheduling[Task Execution and Scheduling] section of the Spring Framework reference manual.
That default `TaskScheduler` starts up automatically with a pool of ten threads, but see <<global-properties>>.
If you provide your own `TaskScheduler` instance instead, you can set the 'autoStartup' property to `false` or provide your own pool size value.
@@ -133,7 +133,7 @@ Such endpoints have no poller configuration, since their handlers are invoked di
[IMPORTANT]
=====
When running in a JEE container, you may need to use Spring's `TimerManagerTaskScheduler`, as described http://docs.spring.io/spring/docs/current/spring-framework-reference/html/scheduling.html#scheduling-task-scheduler-implementations[here], instead of the default `taskScheduler`.
When running in a JEE container, you may need to use Spring's `TimerManagerTaskScheduler`, as described https://docs.spring.io/spring/docs/current/spring-framework-reference/integration.html#scheduling-task-scheduler-implementations[here], instead of the default `taskScheduler`.
To do so, define a bean with the appropriate JNDI name for your environment, as the following example shows:
====
@@ -392,7 +392,7 @@ This is consistent across both configuration options (namespace and annotations)
TIP: The combination of output channels on endpoints and the reply channel message header enables a pipeline approach, where multiple components have an output channel and the final component allows the reply message to be forwarded to the reply channel (as specified in the original request message).
In other words, the final component depends on the information provided by the original sender and can dynamically support any number of clients as a result.
This is an example of the http://eaipatterns.com/ReturnAddress.html[return address] pattern.
This is an example of the https://www.enterpriseintegrationpatterns.com/ReturnAddress.html[return address] pattern.
In addition to the examples shown here, these annotations also support the `inputChannel` and `outputChannel` properties, as the following example shows:
@@ -624,7 +624,7 @@ public class MyFlowConfiguration {
@Bean
@ServiceActivator(inputChannel = "httpChannel")
public MessageHandler httpHandler() {
HttpRequestExecutingMessageHandler handler = new HttpRequestExecutingMessageHandler("http://foo/service");
HttpRequestExecutingMessageHandler handler = new HttpRequestExecutingMessageHandler("https://foo/service");
handler.setExpectedResponseType(String.class);
handler.setOutputChannelName("outputChannel");
return handler;

View File

@@ -2,7 +2,7 @@
=== Content Enricher
At times, you may have a requirement to enhance a request with more information than was provided by the target system.
The http://www.eaipatterns.com/DataEnricher.html[data enricher] pattern describes various scenarios as well as the component (Enricher) that lets you address such requirements.
The https://www.enterpriseintegrationpatterns.com/DataEnricher.html[data enricher] pattern describes various scenarios as well as the component (Enricher) that lets you address such requirements.
The Spring Integration `Core` module includes two enrichers:
@@ -112,7 +112,7 @@ You can similarly point to a Groovy script, as the following example shows:
===== SpEL Support
In Spring Integration 2.0, we introduced the convenience of the http://docs.spring.io/spring/docs/current/spring-framework-reference/html/expressions.html[Spring Expression Language (SpEL)] to help configure many different components.
In Spring Integration 2.0, we introduced the convenience of the https://docs.spring.io/spring/docs/current/spring-framework-reference/core.html#expressions[Spring Expression Language (SpEL)] to help configure many different components.
The header enricher is one of them.
Look again at the POJO example shown earlier.
You can see that the computation logic to determine the header value is pretty simple.

View File

@@ -1,7 +1,7 @@
[[control-bus]]
=== Control Bus
As described in the http://www.eaipatterns.com[_Enterprise Integration Patterns_] (EIP) book, the idea behind the control bus is that the same messaging system can be used for monitoring and managing the components within the framework as is used for "`application-level`" messaging.
As described in the https://www.enterpriseintegrationpatterns.com/[_Enterprise Integration Patterns_] (EIP) book, the idea behind the control bus is that the same messaging system can be used for monitoring and managing the components within the framework as is used for "`application-level`" messaging.
In Spring Integration, we build upon the adapters described above so that you can send messages as a means of invoking exposed operations.
The following example shows how to configure a control bus with XML:

View File

@@ -57,7 +57,7 @@ You need not replace all of your existing XML configuration to use Java configur
=== DSL Basics
The `org.springframework.integration.dsl` package contains the `IntegrationFlowBuilder` API mentioned earlier and a number of `IntegrationComponentSpec` implementations, which are also builders and provide the fluent API to configure concrete endpoints.
The `IntegrationFlowBuilder` infrastructure provides common http://www.eaipatterns.com[enterprise integration patterns] (EIP) for message-based applications, such as channels, endpoints, pollers, and channel interceptors.
The `IntegrationFlowBuilder` infrastructure provides common https://www.enterpriseintegrationpatterns.com/[enterprise integration patterns] (EIP) for message-based applications, such as channels, endpoints, pollers, and channel interceptors.
Endpoints are expressed as verbs in the DSL to improve readability.
The following list includes the common DSL method names and the associated EIP endpoint:

View File

@@ -11,7 +11,7 @@ Some of these are also capable of sending reply messages.
Sending messages is quite straightforward.
As shown earlier in <<channel>>, you can send a message to a message channel.
However, receiving is a bit more complicated.
The main reason is that there are two types of consumers: http://www.eaipatterns.com/PollingConsumer.html[polling consumers] and http://www.eaipatterns.com/EventDrivenConsumer.html[event-driven consumers].
The main reason is that there are two types of consumers: https://www.enterpriseintegrationpatterns.com/PollingConsumer.html[polling consumers] and https://www.enterpriseintegrationpatterns.com/EventDrivenConsumer.html[event-driven consumers].
Of the two, event-driven consumers are much simpler.
Without any need to manage and schedule a separate poller thread, they are essentially listeners with a callback method.
@@ -449,8 +449,8 @@ You can now obtain a reference to the trigger bean and change the polling interv
For an example, see the https://github.com/SpringSource/spring-integration-samples/tree/master/intermediate[Spring Integration Samples] project.
It contains a sample called `dynamic-poller`, which uses a custom trigger and demonstrates the ability to change the polling interval at runtime.
The sample provides a custom trigger that implements the http://static.springsource.org/spring/docs/current/javadoc-api/org/springframework/scheduling/Trigger.html[`org.springframework.scheduling.Trigger`] interface.
The sample's trigger is based on Spring's http://static.springsource.org/spring/docs/current/javadoc-api/org/springframework/scheduling/support/PeriodicTrigger.html[`PeriodicTrigger`] implementation.
The sample provides a custom trigger that implements the https://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/scheduling/Trigger.html[`org.springframework.scheduling.Trigger`] interface.
The sample's trigger is based on Spring's https://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/scheduling/support/PeriodicTrigger.html[`PeriodicTrigger`] implementation.
However, the fields of the custom trigger are not final, and the properties have explicit getters and setters, letting you dynamically change the polling period at runtime.
NOTE: It is important to note, though, that because the Trigger method is `nextExecutionTime()`, any changes to a dynamic trigger do not take effect until the next poll, based on the existing configuration.
@@ -534,7 +534,7 @@ public class ContextConfiguration {
[IMPORTANT]
=====
When configuring an application context, the Spring Framework lets you add a `conversionService` bean (see http://static.springsource.org/spring/docs/current/spring-framework-reference/html/validation.html#core-convert-Spring-config[Configuring a ConversionService] chapter).
When configuring an application context, the Spring Framework lets you add a `conversionService` bean (see https://docs.spring.io/spring/docs/current/spring-framework-reference/core.html#core-convert-Spring-config[Configuring a ConversionService] chapter).
This service is used, when needed, to perform appropriate conversions during bean creation and configuration.
In contrast, the `integrationConversionService` is used for runtime conversions.
@@ -628,7 +628,7 @@ One of the ways to handle this is to set the `queue-capacity` attribute of the t
Even 0 is a reasonable value.
You can also manage it by specifying what to do with messages that can not be queued by setting the `rejection-policy` attribute of the Task Executor (for example, to `DISCARD`).
In other words, there are certain details you must understand when configuring `TaskExecutor`.
See http://docs.spring.io/spring/docs/current/spring-framework-reference/html/scheduling.html["`Task Execution and Scheduling`"] in the Spring reference manual for more detail on the subject.
See https://docs.spring.io/spring/docs/current/spring-framework-reference/integration.html#scheduling["`Task Execution and Scheduling`"] in the Spring reference manual for more detail on the subject.
[[endpoint-inner]]
==== Endpoint Inner Beans
@@ -657,7 +657,7 @@ You can instead use an inner bean definition, as the following example shows:
The bean is treated like any inner bean declared and is not registered with the application context.
If you wish to access this bean in some other manner, declare it at the top level with an `id` and use the `ref` attribute instead.
See the http://docs.spring.io/spring-framework/docs/current/spring-framework-reference/html/beans.html#beans-inner-beans[Spring Documentation] for more information.
See the https://docs.spring.io/spring/docs/current/spring-framework-reference/core.html#beans-inner-beans[Spring Documentation] for more information.
[[endpoint-roles]]
=== Endpoint Roles

View File

@@ -2,7 +2,7 @@
== Spring `ApplicationEvent` Support
Spring Integration provides support for inbound and outbound `ApplicationEvents`, as defined by the underlying Spring Framework.
For more information about Spring's support for events and listeners, see the http://docs.spring.io/spring/docs/current/spring-framework-reference/html/beans.html#context-functionality-events[Spring Reference Manual].
For more information about Spring's support for events and listeners, see the https://docs.spring.io/spring/docs/current/spring-framework-reference/core.html#context-functionality-events[Spring Reference Manual].
You need to include this dependency into your project:

View File

@@ -34,7 +34,7 @@ To configure the 'feed' namespace, include the following elements within the hea
----
xmlns:int-feed="http://www.springframework.org/schema/integration/feed"
xsi:schemaLocation="http://www.springframework.org/schema/integration/feed
http://www.springframework.org/schema/integration/feed/spring-integration-feed.xsd"
https://www.springframework.org/schema/integration/feed/spring-integration-feed.xsd"
----
====
@@ -50,7 +50,7 @@ The following example shows a possible configuration:
----
<int-feed:inbound-channel-adapter id="feedAdapter"
channel="feedChannel"
url="http://feeds.bbci.co.uk/news/rss.xml">
url="https://feeds.bbci.co.uk/news/rss.xml">
<int:poller fixed-rate="10000" max-messages-per-poll="100" />
</int-feed:inbound-channel-adapter>
----

View File

@@ -224,11 +224,11 @@ To do so, use the following template:
xmlns:int="http://www.springframework.org/schema/integration"
xmlns:int-file="http://www.springframework.org/schema/integration/file"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
https://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/integration
http://www.springframework.org/schema/integration/spring-integration.xsd
https://www.springframework.org/schema/integration/spring-integration.xsd
http://www.springframework.org/schema/integration/file
http://www.springframework.org/schema/integration/file/spring-integration-file.xsd">
https://www.springframework.org/schema/integration/file/spring-integration-file.xsd">
</beans>
----
====
@@ -615,7 +615,7 @@ See the https://docs.spring.io/spring-integration/api/org/springframework/integr
[[file-writing]]
=== Writing files
To write messages to the file system, you can use a http://docs.spring.io/spring-integration/api/org/springframework/integration/file/FileWritingMessageHandler.html[`FileWritingMessageHandler`].
To write messages to the file system, you can use a https://docs.spring.io/spring-integration/api/org/springframework/integration/file/FileWritingMessageHandler.html[`FileWritingMessageHandler`].
This class can deal with the following payload types:
* `File`
@@ -637,8 +637,8 @@ This callback could be used to write a CSV header defined in the message header,
==== Generating File Names
In its simplest form, the `FileWritingMessageHandler` requires only a destination directory for writing the files.
The name of the file to be written is determined by the handler's http://docs.spring.io/spring-integration/api/org/springframework/integration/file/FileNameGenerator.html[`FileNameGenerator`].
The http://docs.spring.io/spring-integration/api/org/springframework/integration/file/DefaultFileNameGenerator.html[default implementation] looks for a message header whose key matches the constant defined as http://docs.spring.io/spring-integration/api/constant-values.html#org.springframework.integration.file.FileHeaders.FILENAME[`FileHeaders.FILENAME`].
The name of the file to be written is determined by the handler's https://docs.spring.io/spring-integration/api/org/springframework/integration/file/FileNameGenerator.html[`FileNameGenerator`].
The https://docs.spring.io/spring-integration/api/org/springframework/integration/file/DefaultFileNameGenerator.html[default implementation] looks for a message header whose key matches the constant defined as https://docs.spring.io/spring-integration/api/constant-values.html#org.springframework.integration.file.FileHeaders.FILENAME[`FileHeaders.FILENAME`].
Alternatively, you can specify an expression to be evaluated against the message to generate a file name -- for example, `headers['myCustomHeader'] + '.something'`.
The expression must evaluate to a `String`.
@@ -740,7 +740,7 @@ This option has the same semantics as `APPEND`, but the data is not flushed and
This can provide a significant performance at the risk of data loss in the event of a failure.
See <<file-flushing>> for more information.
`FAIL`::
If the target file exists, a http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/messaging/MessageHandlingException.html[`MessageHandlingException`] is thrown.
If the target file exists, a https://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/messaging/MessageHandlingException.html[`MessageHandlingException`] is thrown.
`IGNORE`::
If the target file exists, the message payload is silently ignored.
@@ -853,7 +853,7 @@ Generally, when using the file outbound gateway, the result file is returned as
This also applies when specifying the `IGNORE` mode.
In that case the pre-existing destination file is returned.
If the payload of the request message was a file, you still have access to that original file through the message header.
See http://docs.spring.io/spring-integration/api/org/springframework/integration/file/FileHeaders.html[FileHeaders.ORIGINAL_FILE].
See https://docs.spring.io/spring-integration/api/org/springframework/integration/file/FileHeaders.html[FileHeaders.ORIGINAL_FILE].
NOTE: The 'outbound-gateway' works well in cases where you want to first move a file and then send it through a processing pipeline.
In such cases, you may connect the file namespace's `inbound-channel-adapter` element to the `outbound-gateway` and then connect that gateway's `reply-channel` to the beginning of the pipeline.

View File

@@ -124,7 +124,7 @@ It can be used to avoid Java entirely for simple filters, as the following examp
====
The string passed as the value of the expression attribute is evaluated as a SpEL expression with the message available in the evaluation context.
If you must include the result of an expression in the scope of the application context, you can use the `#{}` notation, as defined in the http://docs.spring.io/spring/docs/current/spring-framework-reference/html/expressions.html#expressions-beandef[SpEL reference documentation], as the following example shows:
If you must include the result of an expression in the scope of the application context, you can use the `#{}` notation, as defined in the https://docs.spring.io/spring/docs/current/spring-framework-reference/core.html#expressions-beandef[SpEL reference documentation], as the following example shows:
====
[source,xml]

View File

@@ -40,7 +40,7 @@ To use the FTP namespace, add the following to the header of your XML file:
----
xmlns:int-ftp="http://www.springframework.org/schema/integration/ftp"
xsi:schemaLocation="http://www.springframework.org/schema/integration/ftp
http://www.springframework.org/schema/integration/ftp/spring-integration-ftp.xsd"
https://www.springframework.org/schema/integration/ftp/spring-integration-ftp.xsd"
----
====
@@ -110,11 +110,11 @@ NOTE: If you experience connectivity problems and would like to trace session cr
Now you need only inject these session factories into your adapters.
The protocol (FTP or FTPS) that an adapter uses depends on the type of session factory that has been injected into the adapter.
NOTE: A more practical way to provide values for FTP or FTPS session factories is to use Spring's property placeholder support (See http://docs.spring.io/spring/docs/current/spring-framework-reference/html/beans.html#beans-factory-placeholderconfigurer).
NOTE: A more practical way to provide values for FTP or FTPS session factories is to use Spring's property placeholder support (See https://docs.spring.io/spring/docs/current/spring-framework-reference/core.html#beans-factory-placeholderconfigurer).
=== Advanced Configuration
`DefaultFtpSessionFactory` provides an abstraction over the underlying client API, which (since Spring Integration 2.0) is http://commons.apache.org/net/[Apache Commons Net].
`DefaultFtpSessionFactory` provides an abstraction over the underlying client API, which (since Spring Integration 2.0) is https://commons.apache.org/net/[Apache Commons Net].
This spares you from the low-level configuration details of the `org.apache.commons.net.ftp.FTPClient`.
Several common properties are exposed on the session factory (since version 4.0, this now includes `connectTimeout`, `defaultTimeout`, and `dataTimeout`).
However, you sometimes need access to lower level `FTPClient` configuration to achieve more advanced configuration (such as setting the port range for active mode).
@@ -163,7 +163,7 @@ See https://scarybeastsecurity.blogspot.cz/2009/02/vsftpd-210-released.html for
Currently, the Apache FTPSClient does not support this feature.
See https://issues.apache.org/jira/browse/NET-408[NET-408].
The following solution, courtesy of http://stackoverflow.com/questions/32398754/how-to-connect-to-ftps-server-with-data-connection-using-same-tls-session[Stack Overflow], uses reflection on the `sun.security.ssl.SSLSessionContextImpl`, so it may not work on other JVMs.
The following solution, courtesy of https://stackoverflow.com/questions/32398754/how-to-connect-to-ftps-server-with-data-connection-using-same-tls-session[Stack Overflow], uses reflection on the `sun.security.ssl.SSLSessionContextImpl`, so it may not work on other JVMs.
The stack overflow answer was submitted in 2015, and the solution has been tested by the Spring Integration team recently on JDK 1.8.0_112.
The following example shows how to create an FTPS session:
@@ -850,7 +850,7 @@ NOTE: By default, if no file name generator is specified, Spring Integration us
`DefaultFileNameGenerator` determines the file name based on the value of the `file_name` header (if it exists) in the `MessageHeaders`, or, if the payload of the Message is already a `java.io.File`, it uses the original name of that file.
IMPORTANT: Defining certain values (such as `remote-directory`) might be platform- or FTP server-dependent.
For example, as was reported on http://forum.springsource.org/showthread.php?p=333478&posted=1#post333478, on some platforms, you must add a slash to the end of the directory definition (for example, `remote-directory="/thing1/thing2/"` instead of `remote-directory="/thing1/thing2"`).
For example, as was reported on https://forum.spring.io/showthread.php?p=333478&posted=1#post333478, on some platforms, you must add a slash to the end of the directory definition (for example, `remote-directory="/thing1/thing2/"` instead of `remote-directory="/thing1/thing2"`).
Starting with version 4.1, you can specify the `mode` when transferring the file.
By default, an existing file is overwritten.
@@ -1451,7 +1451,7 @@ The template provides methods to send, retrieve (as an `InputStream`), remove, a
In addition an `execute` method is provided allowing the caller to execute multiple operations on the session.
In all cases, the template takes care of reliably closing the session.
For more information, see the
http://docs.spring.io/spring-integration/api/org/springframework/integration/file/remote/RemoteFileTemplate.html[Javadoc for `RemoteFileTemplate`].
https://docs.spring.io/spring-integration/api/org/springframework/integration/file/remote/RemoteFileTemplate.html[Javadoc for `RemoteFileTemplate`].
There is a subclass for FTP: `FtpRemoteFileTemplate`.
Version 4.1 added added additional methods, including `getClientInstance()`, which provides access to the underlying `FTPClient` and thus gives you access to low-level APIs.

View File

@@ -24,10 +24,10 @@ compile "org.springframework.integration:spring-integration-gemfire:{project-ver
====
GemFire is a distributed data management platform that provides a key-value data grid along with advanced distributed system features, such as event processing, continuous querying, and remote function execution.
This guide assumes some familiarity with the commercial https://pivotal.io/pivotal-gemfire[Pivotal GemFire] or Open Source http://geode.apache.org[Apache Geode].
This guide assumes some familiarity with the commercial https://pivotal.io/pivotal-gemfire[Pivotal GemFire] or Open Source https://geode.apache.org[Apache Geode].
Spring integration provides support for GemFire by implementing inbound adapters for entry and continuous query events, an outbound adapter to write entries to the cache, and message and metadata stores and `GemfireLockRegistry` implementations.
Spring integration leverages the http://projects.spring.io/spring-data-gemfire[Spring Data for Pivotal GemFire] project, providing a thin wrapper over its components.
Spring integration leverages the https://projects.spring.io/spring-data-gemfire[Spring Data for Pivotal GemFire] project, providing a thin wrapper over its components.
Starting with version 5.1, the Spring Integration GemFire module uses the https://github.com/spring-projects/spring-data-geode[Spring Data for Apache Geode] transitive dependency by default.
To switch to the commercial Pivotal GemFire-based Spring Data for Pivotal GemFire, exclude `spring-data-geode` from dependencies and add `spring-data-gemfire`, as the following Maven snippet shows:
@@ -60,7 +60,7 @@ To configure the 'int-gfe' namespace, include the following elements within the
----
xmlns:int-gfe="http://www.springframework.org/schema/integration/gemfire"
xsi:schemaLocation="http://www.springframework.org/schema/integration/gemfire
http://www.springframework.org/schema/integration/gemfire/spring-integration-gemfire.xsd"
https://www.springframework.org/schema/integration/gemfire/spring-integration-gemfire.xsd"
----
====
@@ -114,7 +114,7 @@ The continuous query acts as an event source that fires whenever its result set
NOTE: GemFire queries are written in OQL and are scoped to the entire cache (not just one region).
Additionally, continuous queries require a remote (that is, running in a separate process or remote host) cache server.
See the http://gemfire82.docs.pivotal.io/docs-gemfire/gemfire_nativeclient/continuous-querying/continuous-querying.html[GemFire documentation] for more information on implementing continuous queries.
See the https://gemfire82.docs.pivotal.io/docs-gemfire/gemfire_nativeclient/continuous-querying/continuous-querying.html[GemFire documentation] for more information on implementing continuous queries.
The following configuration creates a GemFire client cache (recall that a remote cache server is required for this implementation and its address is configured as a child element of the pool), a client region, and a `ContinuousQueryListenerContainer` that uses Spring Data:
@@ -188,9 +188,9 @@ This adapter also supports the `order` attribute, which may be useful if it is b
[[gemfire-message-store]]
=== Gemfire Message Store
As described in EIP, a http://www.eaipatterns.com/MessageStore.html[message store] lets you persist messages.
As described in EIP, a https://www.enterpriseintegrationpatterns.com/MessageStore.html[message store] lets you persist messages.
This can be useful when dealing with components that have a capability to buffer messages (`QueueChannel`, `Aggregator`, `Resequencer`, and others) if reliability is a concern.
In Spring Integration, the `MessageStore` strategy interface also provides the foundation for the http://www.eaipatterns.com/StoreInLibrary.html[claim check] pattern, which is described in EIP as well.
In Spring Integration, the `MessageStore` strategy interface also provides the foundation for the https://www.enterpriseintegrationpatterns.com/StoreInLibrary.html[claim check] pattern, which is described in EIP as well.
Spring Integration's Gemfire module provides `GemfireMessageStore`, which is an implementation of both the the `MessageStore` strategy (mainly used by the `QueueChannel` and `ClaimCheck` patterns) and the `MessageGroupStore` strategy (mainly used by the `Aggregator` and `Resequencer` patterns).

View File

@@ -2,7 +2,7 @@
=== Groovy support
In Spring Integration 2.0, we added Groovy support, letting you use the Groovy scripting language to provide the logic for various integration components -- similar to the way the Spring Expression Language (SpEL) is supported for routing, transformation, and other integration concerns.
For more information about Groovy, see the Groovy documentation, which you can find on the http://www.groovy-lang.org/[project website].
For more information about Groovy, see the Groovy documentation, which you can find on the https://groovy-lang.org/[project website].
You need to include this dependency into your project:
@@ -95,7 +95,7 @@ For more information regarding the `<variable>` element, the `variables` attribu
The `@CompileStatic` hint is the most popular Groovy compiler customization option.
It can be used on the class or method level.
For more information, see the Groovy http://docs.groovy-lang.org/latest/html/documentation/index.html#_static_compilation[Reference Manual] and, specifically, http://docs.groovy-lang.org/latest/html/documentation/index.html#compilestatic-annotation[@CompileStatic].
For more information, see the Groovy https://groovy-lang.org/metaprogramming.html#section-typechecked[Reference Manual] and, specifically, https://groovy-lang.org/metaprogramming.html#xform-CompileStatic[@CompileStatic].
To utilize this feature for short scripts (in integration scenarios), we are forced to change simple scripts to more Java-like code.
Consider the following `<filter>` script:
@@ -139,7 +139,7 @@ You must access the `headers` and `payload` (or any other) variables through the
In addition, we introduced the `compiler-configuration` bean reference.
With this attribute, you can provide any other required Groovy compiler customizations, such as `ImportCustomizer`.
For more information about this feature, see the Groovy Documentation for http://groovy.jmiguel.eu/groovy.codehaus.org/Advanced+compiler+configuration.html[advanced compiler configuration].
For more information about this feature, see the Groovy Documentation for https://melix.github.io/blog/2011/05/12/customizing_groovy_compilation_process.html[advanced compiler configuration].
NOTE: Using `compilerConfiguration` does not automatically add an `ASTTransformationCustomizer` for the `@CompileStatic` annotation, and it overrides the `compileStatic` option.
If you still need `CompileStatic`, you should manually add a `new ASTTransformationCustomizer(CompileStatic.class)` into the `CompilationCustomizers` of that custom `compilerConfiguration`.
@@ -149,7 +149,7 @@ NOTE: The Groovy compiler customization does not have any effect on the `refresh
[[groovy-control-bus]]
==== Control Bus
As described in (http://www.eaipatterns.com/ControlBus.html[Enterprise Integration Patterns]), the idea behind the control bus is that you can use the same messaging system for monitoring and managing the components within the framework as is used for "`application-level`" messaging.
As described in (https://www.enterpriseintegrationpatterns.com/ControlBus.html[Enterprise Integration Patterns]), the idea behind the control bus is that you can use the same messaging system for monitoring and managing the components within the framework as is used for "`application-level`" messaging.
In Spring Integration, we build upon the adapters described earlier so that you can send Messages as a means of invoking exposed operations.
One option for those operations is Groovy scripts.
The following example configures a Groovy script for the control bus:

View File

@@ -71,7 +71,7 @@ Stateful retry is the case where the retry state is managed within the advice bu
An example for stateful retry is when we want the message originator (for example,JMS) to be responsible for resubmitting, rather than performing it on the current thread.
Stateful retry needs some mechanism to detect a retried submission.
For more information on `spring-retry`, see https://docs.spring.io/spring-integration/api/[the project's Javadoc] and the reference documentation for http://docs.spring.io/spring-batch/reference/html/retry.html[Spring Batch], where `spring-retry` originated.
For more information on `spring-retry`, see https://docs.spring.io/spring-integration/api/[the project's Javadoc] and the reference documentation for https://docs.spring.io/spring-batch/reference/html/retry.html[Spring Batch], where `spring-retry` originated.
WARNING: The default back off behavior is to not back off.
Retries are attempted immediately.
@@ -562,7 +562,7 @@ This method must be used in cases where the invocation might be called multiple
This is required because the Spring AOP `org.springframework.aop.framework.ReflectiveMethodInvocation` object maintains state by keeping track of which advice in a chain was last invoked.
This state must be reset for each call.
For more information, see the http://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/aop/framework/ReflectiveMethodInvocation.html[ReflectiveMethodInvocation] Javadoc.
For more information, see the https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/aop/framework/ReflectiveMethodInvocation.html[ReflectiveMethodInvocation] Javadoc.
=====
[[other-advice]]
@@ -605,7 +605,7 @@ Consider the following configuration:
In the preceding example, the `<tx:advice>` is applied to the `AbstractReplyProducingMessageHandler.handleRequestMessage()`.
However, `myHandleMessageAdvice` is applied for to `MessageHandler.handleMessage()`.
Therefore, it is invoked *before* the `<tx:advice>`.
To retain the order, you should follow the standard http://docs.spring.io/spring/docs/current/spring-framework-reference/html/aop-api.html[Spring AOP] configuration approach and use an endpoint `id` together with the `.handler` suffix to obtain the target `MessageHandler` bean.
To retain the order, you should follow the standard https://docs.spring.io/spring/docs/current/spring-framework-reference/core.html#aop-api[Spring AOP] configuration approach and use an endpoint `id` together with the `.handler` suffix to obtain the target `MessageHandler` bean.
Note that, in that case, the entire downstream flow is within the transaction scope.
In the case of a `MessageHandler` that does not return a response, the advice chain order is retained.
@@ -775,7 +775,7 @@ String componentName = handler.getComponentName();
[[idempotent-receiver]]
==== Idempotent Receiver Enterprise Integration Pattern
Starting with version 4.1, Spring Integration provides an implementation of the http://www.eaipatterns.com/IdempotentReceiver.html[Idempotent Receiver] Enterprise Integration Pattern.
Starting with version 4.1, Spring Integration provides an implementation of the https://www.enterpriseintegrationpatterns.com/IdempotentReceiver.html[Idempotent Receiver] Enterprise Integration Pattern.
It is a functional pattern and the whole idempotency logic should be implemented in the application.
However, to simplify the decision-making, the `IdempotentReceiverInterceptor` component is provided.
This is an AOP `Advice` that is applied to the `MessageHandler.handleMessage()` method and that can `filter` a request message or mark it as a `duplicate`, according to its configuration.

View File

@@ -31,9 +31,9 @@ The `javax.servlet:javax.servlet-api` dependency must be provided on the target
=== Http Inbound Components
To receive messages over HTTP, you need to use an HTTP inbound channel adapter or an HTTP inbound gateway.
To support the HTTP inbound adapters, they need to be deployed within a servlet container such as http://tomcat.apache.org/[Apache Tomcat] or http://www.eclipse.org/jetty/[Jetty].
To support the HTTP inbound adapters, they need to be deployed within a servlet container such as https://tomcat.apache.org/[Apache Tomcat] or https://www.eclipse.org/jetty/[Jetty].
The easiest way to do this is to use Spring's
http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/web/context/support/HttpRequestHandlerServlet.html[`HttpRequestHandlerServlet`], by providing the following servlet definition in the `web.xml` file:
https://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/web/context/support/HttpRequestHandlerServlet.html[`HttpRequestHandlerServlet`], by providing the following servlet definition in the `web.xml` file:
====
[source,xml]
@@ -47,13 +47,13 @@ http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/web/co
Notice that the servlet name matches the bean name.
For more information on using the `HttpRequestHandlerServlet`, see
http://docs.spring.io/spring/docs/current/spring-framework-reference/html/remoting.html[Remoting and web services using Spring],
https://docs.spring.io/spring/docs/current/spring-framework-reference/html/remoting.html[Remoting and web services using Spring],
which is part of the Spring Framework Reference documentation.
If you are running within a Spring MVC application, then the aforementioned explicit servlet definition is not necessary.
In that case, the bean name for your gateway can be matched against the URL path as you would for a Spring MVC Controller bean.
For more information, see
http://docs.spring.io/spring/docs/current/spring-framework-reference/html/mvc.html[Web MVC framework], which is part of the Spring Framework Reference documentation.
https://docs.spring.io/spring/docs/current/spring-framework-reference/web.html#mvc[Web MVC framework], which is part of the Spring Framework Reference documentation.
TIP: For a sample application and the corresponding configuration, see the https://github.com/spring-projects/spring-integration-samples[Spring Integration Samples] repository.
It contains the https://github.com/spring-projects/spring-integration-samples/tree/master/basic/http[HTTP sample] application, which demonstrates Spring Integration's HTTP support.
@@ -89,7 +89,7 @@ If the request has been wrapped as a `MultipartHttpServletRequest`, when you use
NOTE: The HTTP inbound endpoint locates a `MultipartResolver` in the context if one has a bean name of `multipartResolver` (the same name expected by Spring's `DispatcherServlet`).
If it does locate that bean, the support for multipart files is enabled on the inbound request mapper.
Otherwise, it fails when it tries to map a multipart file request to a Spring Integration `Message`.
For more on Spring's support for `MultipartResolver`, see the http://docs.spring.io/spring/docs/current/spring-framework-reference/html/mvc.html#mvc-multipart[Spring Reference Manual].
For more on Spring's support for `MultipartResolver`, see the https://docs.spring.io/spring/docs/current/spring-framework-reference/web.html#mvc-multipart[Spring Reference Manual].
[NOTE]
====
@@ -205,7 +205,7 @@ If `transfer-cookies` is `false`, any `Set-Cookie` header received remains as `S
HTTP is a request-response protocol.
However, the response may not have a body, only headers.
In this case, the `HttpRequestExecutingMessageHandler` produces a reply `Message` with the payload being an `org.springframework.http.ResponseEntity`, regardless of any provided `expected-response-type`.
According to the http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html[HTTP RFC Status Code Definitions], there are many statuses that mandate that a response must not contain a message-body (for example,
According to the https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html[HTTP RFC Status Code Definitions], there are many statuses that mandate that a response must not contain a message-body (for example,
`204 No Content`).
There are also cases where calls to the same URL might or might not return a response body.
For example, the first request to an HTTP resource returns content, but the second does not (returning a `304 Not Modified`).
@@ -237,11 +237,11 @@ To include it in your configuration, provide the following namespace declaration
xmlns:int-http="http://www.springframework.org/schema/integration/http"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
https://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/integration
http://www.springframework.org/schema/integration/spring-integration.xsd
https://www.springframework.org/schema/integration/spring-integration.xsd
http://www.springframework.org/schema/integration/http
http://www.springframework.org/schema/integration/http/spring-integration-http.xsd">
https://www.springframework.org/schema/integration/http/spring-integration-http.xsd">
...
</beans>
----
@@ -276,14 +276,14 @@ The following example shows how to configure one:
[[http-request-mapping]]
==== Request Mapping Support
NOTE: Spring Integration 3.0 improved the REST support by introducing the http://static.springsource.org/spring-integration/api/org/springframework/integration/http/inbound/IntegrationRequestMappingHandlerMapping.html[`IntegrationRequestMappingHandlerMapping`].
NOTE: Spring Integration 3.0 improved the REST support by introducing the https://docs.spring.io/spring-integration/api/org/springframework/integration/http/inbound/IntegrationRequestMappingHandlerMapping.html[`IntegrationRequestMappingHandlerMapping`].
The implementation relies on the enhanced REST support provided by Spring Framework 3.1 or higher.
The parsing of the HTTP inbound gateway or the HTTP inbound channel adapter registers an `integrationRequestMappingHandlerMapping` bean of type http://static.springsource.org/spring-integration/api/org/springframework/integration/http/inbound/IntegrationRequestMappingHandlerMapping.html[`IntegrationRequestMappingHandlerMapping`], in case one is not yet registered.
This particular implementation of the http://static.springsource.org/spring/docs/current/javadoc-api/org/springframework/web/servlet/HandlerMapping.html[`HandlerMapping`] delegates its logic to http://static.springsource.org/spring/docs/current/javadoc-api/org/springframework/web/servlet/mvc/method/RequestMappingInfoHandlerMapping.html[`RequestMappingInfoHandlerMapping`].
The implementation provides functionality similar to the http://static.springsource.org/spring/docs/current/javadoc-api/org/springframework/web/bind/annotation/RequestMapping.html[`org.springframework.web.bind.annotation.RequestMapping`] annotation in Spring MVC.
The parsing of the HTTP inbound gateway or the HTTP inbound channel adapter registers an `integrationRequestMappingHandlerMapping` bean of type https://docs.spring.io/spring-integration/api/org/springframework/integration/http/inbound/IntegrationRequestMappingHandlerMapping.html[`IntegrationRequestMappingHandlerMapping`], in case one is not yet registered.
This particular implementation of the https://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/web/servlet/HandlerMapping.html[`HandlerMapping`] delegates its logic to https://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/web/servlet/mvc/method/RequestMappingInfoHandlerMapping.html[`RequestMappingInfoHandlerMapping`].
The implementation provides functionality similar to the https://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/web/bind/annotation/RequestMapping.html[`org.springframework.web.bind.annotation.RequestMapping`] annotation in Spring MVC.
NOTE: For more information, see http://static.springsource.org/spring/docs/current/spring-framework-reference/html/mvc.html#mvc-ann-requestmapping[Mapping Requests With `@RequestMapping`].
NOTE: For more information, see https://docs.spring.io/spring/docs/current/spring-framework-reference/web.html#mvc-ann-requestmapping[Mapping Requests With `@RequestMapping`].
For this purpose, Spring Integration 3.0 introduces the `<request-mapping>` element.
You can add this optional element to `<http:inbound-channel-adapter>` and `<http:inbound-gateway>`.
@@ -308,8 +308,8 @@ The following example shows how to configure it on an inbound gateway:
----
====
Based on the preceding configuration, the namespace parser creates an instance of the `IntegrationRequestMappingHandlerMapping` (if none exists) and an `HttpRequestHandlingController` bean and associates with it an instance of http://static.springsource.org/spring-integration/api/org/springframework/integration/http/inbound/RequestMapping.html[`RequestMapping`].
This `RequestMapping` instance is, in turn, converted to the Spring MVC http://static.springsource.org/spring/docs/current/javadoc-api/org/springframework/web/servlet/mvc/method/RequestMappingInfo.html[`RequestMappingInfo`].
Based on the preceding configuration, the namespace parser creates an instance of the `IntegrationRequestMappingHandlerMapping` (if none exists) and an `HttpRequestHandlingController` bean and associates with it an instance of https://docs.spring.io/spring-integration/api/org/springframework/integration/http/inbound/RequestMapping.html[`RequestMapping`].
This `RequestMapping` instance is, in turn, converted to the Spring MVC https://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/web/servlet/mvc/method/RequestMappingInfo.html[`RequestMappingInfo`].
The `<request-mapping>` element provides the following attributes:
@@ -460,13 +460,13 @@ When you use the `payload-expression` attribute, the `{firstName}` URI template
----
====
For more information about URI template variables, see http://static.springsource.org/spring/docs/current/spring-framework-reference/html/mvc.html#mvc-ann-requestmapping-uri-templates[uri template patterns] in the Spring Reference Manual.
For more information about URI template variables, see https://docs.spring.io/spring/docs/current/spring-framework-reference/web.html#mvc-ann-requestmapping-uri-templates[uri template patterns] in the Spring Reference Manual.
Since Spring Integration 3.0, in addition to the existing `#pathVariables` and `#requestParams` variables being available in payload and header expressions, we added other useful expression variables:
* `#requestParams`: The `MultiValueMap` from the `ServletRequest` `parameterMap`.
* `#pathVariables`: The `Map` from URI Template placeholders and their values.
* `#matrixVariables`: The `Map` of `MultiValueMap` according to the http://docs.spring.io/spring/docs/current/spring-framework-reference/html/mvc.html#mvc-ann-matrix-variables[Spring MVC Specification].
* `#matrixVariables`: The `Map` of `MultiValueMap` according to the https://docs.spring.io/spring/docs/current/spring-framework-reference/web.html#mvc-ann-matrix-variables[Spring MVC Specification].
Note that `#matrixVariables` requires Spring MVC 3.2 or higher.
* `#requestAttributes`: The `org.springframework.web.context.request.RequestAttributes` associated with the current request.
* `#requestHeaders`: The `org.springframework.http.HttpHeaders` object from the current request.
@@ -591,7 +591,7 @@ The following example maps the `zipCode` URI variable to an expression:
[source,xml]
----
<int-http:outbound-gateway id="trafficGateway"
url="http://local.yahooapis.com/trafficData?appid=YdnDemo&amp;zip={zipCode}"
url="https://local.yahooapis.com/trafficData?appid=YdnDemo&amp;zip={zipCode}"
request-channel="trafficChannel"
http-method="GET"
expected-response-type="java.lang.String">
@@ -614,7 +614,7 @@ The following example shows how to use the `uri-variables-expression` attribute:
[source,xml]
----
<int-http:outbound-gateway
url="http://foo.host/{foo}/bars/{bar}"
url="https://foo.host/{foo}/bars/{bar}"
request-channel="trafficChannel"
http-method="GET"
uri-variables-expression="@uriVariablesBean.populate(payload)"
@@ -666,7 +666,7 @@ The following example shows how to do so:
[source,xml]
----
url-expression="T(org.springframework.web.util.UriComponentsBuilder)
.fromHttpUrl('http://HOST:PORT/PATH')
.fromHttpUrl('https://HOST:PORT/PATH')
.queryParams(payload)
.build()
.toUri()"
@@ -707,7 +707,7 @@ List<NameValuePair> nameValuePairs =
==== Controlling URI Encoding
By default, the URL string is encoded (see http://static.springsource.org/spring/docs/current/javadoc-api/org/springframework/web/util/UriComponentsBuilder.html[`UriComponentsBuilder`]) to the URI object before sending the request.
By default, the URL string is encoded (see https://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/web/util/UriComponentsBuilder.html[`UriComponentsBuilder`]) to the URI object before sending the request.
In some scenarios with a non-standard URI (such as the RabbitMQ REST API), it is undesirable to perform the encoding.
The `<http:outbound-gateway/>` and `<http:outbound-channel-adapter/>` provide an `encode-uri` attribute.
To disable encoding the URL, set this attribute to `false` (by default, it is `true`).
@@ -716,7 +716,7 @@ If you wish to partially encode some of the URL, use an `expression` within a `<
====
[source,xml]
----
<http:outbound-gateway url="http://somehost/%2f/fooApps?bar={param}" encode-uri="false">
<http:outbound-gateway url="https://somehost/%2f/fooApps?bar={param}" encode-uri="false">
<http:uri-variable name="param"
expression="T(org.apache.commons.httpclient.util.URIUtil)
.encodeWithinQuery('Hello World!')"/>
@@ -831,13 +831,13 @@ image::images/http-outbound-gateway.png[align="center"]
You may want to configure the HTTP related timeout behavior, when making active HTTP requests by using the HTTP outbound gateway or the HTTP outbound channel adapter.
In those instances, these two components use Spring's
http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/web/client/RestTemplate.html[`RestTemplate`] support to execute HTTP requests.
https://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/web/client/RestTemplate.html[`RestTemplate`] support to execute HTTP requests.
To configure timeouts for the HTTP outbound gateway and the HTTP outbound channel adapter, you can either reference a `RestTemplate` bean directly (by using the `rest-template` attribute) or you can provide a reference to a http://static.springsource.org/spring/docs/current/javadoc-api/org/springframework/http/client/ClientHttpRequestFactory.html[`ClientHttpRequestFactory`] bean (by using the `request-factory` attribute).
To configure timeouts for the HTTP outbound gateway and the HTTP outbound channel adapter, you can either reference a `RestTemplate` bean directly (by using the `rest-template` attribute) or you can provide a reference to a https://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/http/client/ClientHttpRequestFactory.html[`ClientHttpRequestFactory`] bean (by using the `request-factory` attribute).
Spring provides the following implementations of the `ClientHttpRequestFactory` interface:
* http://static.springsource.org/spring/docs/current/javadoc-api/org/springframework/http/client/SimpleClientHttpRequestFactory.html[`SimpleClientHttpRequestFactory`]: Uses standard J2SE facilities for making HTTP Requests
* http://static.springsource.org/spring/docs/current/javadoc-api/org/springframework/http/client/HttpComponentsClientHttpRequestFactory.html[`HttpComponentsClientHttpRequestFactory`]: Uses http://hc.apache.org/httpcomponents-client-ga/[Apache HttpComponents HttpClient] (since Spring 3.1)
* https://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/http/client/SimpleClientHttpRequestFactory.html[`SimpleClientHttpRequestFactory`]: Uses standard J2SE facilities for making HTTP Requests
* https://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/http/client/HttpComponentsClientHttpRequestFactory.html[`HttpComponentsClientHttpRequestFactory`]: Uses https://hc.apache.org/httpcomponents-client-ga/[Apache HttpComponents HttpClient] (since Spring 3.1)
If you do not explicitly configure the `request-factory` or `rest-template` attribute, a default `RestTemplate` (which uses a `SimpleClientHttpRequestFactory`) is instantiated.
@@ -852,19 +852,19 @@ Some non-standard implementation of this method may ignore the specified timeout
To see the connect timeout set, please call getConnectTimeout().
If you have specific needs, you should test your timeouts.
Consider using the `HttpComponentsClientHttpRequestFactory`, which, in turn, uses http://hc.apache.org/httpcomponents-client-ga/[Apache HttpComponents HttpClient] rather than relying on implementations provided by a JVM.
Consider using the `HttpComponentsClientHttpRequestFactory`, which, in turn, uses https://hc.apache.org/httpcomponents-client-ga/[Apache HttpComponents HttpClient] rather than relying on implementations provided by a JVM.
=====
IMPORTANT: When you use the Apache HttpComponents HttpClient with a pooling connection manager, you should be aware that, by default, the connection manager creates no more than two concurrent connections per given route and no more than 20 connections in total.
For many real-world applications, these limits may prove to be too constraining.
See the http://hc.apache.org/httpcomponents-client-ga/[Apache documentation] for information about configuring this important component.
See the https://hc.apache.org/httpcomponents-client-ga/[Apache documentation] for information about configuring this important component.
The following example configures an HTTP outbound gateway by using a `SimpleClientHttpRequestFactory` that is configured with connect and read timeouts of 5 seconds, respectively:
====
[source,xml]
----
<int-http:outbound-gateway url="http://www.google.com/ig/api?weather={city}"
<int-http:outbound-gateway url="https://samples.openweathermap.org/data/2.5/weather?q={city}"
http-method="GET"
expected-response-type="java.lang.String"
request-factory="requestFactory"
@@ -925,7 +925,7 @@ For HTTPS, the following properties are available:
* `https.proxyHost`: The host name of the proxy server.
* `https.proxyPort`: The port number, the default value being 80.
For more information, see http://download.oracle.com/javase/6/docs/technotes/guides/net/proxies.html
For more information, see https://docs.oracle.com/javase/8/docs/technotes/guides/net/proxies.html
==== Spring's `SimpleClientHttpRequestFactory`
@@ -958,7 +958,7 @@ If you need more explicit control over the proxy configuration, you can use Spri
Spring Integration provides support for HTTP header mapping for both HTTP Request and HTTP Responses.
By default, all standard http://en.wikipedia.org/wiki/List_of_HTTP_header_fields[HTTP headers] are mapped from the message to HTTP request or response headers without further configuration.
By default, all standard https://en.wikipedia.org/wiki/List_of_HTTP_header_fields[HTTP headers] are mapped from the message to HTTP request or response headers without further configuration.
However, if you do need further customization, you can provide additional configuration by taking advantage of the namespace support.
You can provide a comma-separated list of header names, and you can include simple patterns with the '*' character acting as a wildcard.
Provide such values overrides the default behavior.

View File

@@ -32,7 +32,7 @@ include::./whats-new.adoc[]
= Overview of Spring Integration Framework
[[spring-integration-intro]]
Spring Integration provides an extension of the Spring programming model to support the well known http://www.eaipatterns.com/[Enterprise Integration Patterns].
Spring Integration provides an extension of the Spring programming model to support the well known https://www.enterpriseintegrationpatterns.com/[Enterprise Integration Patterns].
It enables lightweight messaging within Spring-based applications and supports integration with external systems through declarative adapters.
Those adapters provide a higher level of abstraction over Spring's support for remoting, messaging, and scheduling.

View File

@@ -241,7 +241,7 @@ connect to the socket.
The `<int-ip:udp-outbound-channel-adapter>` (`UnicastSendingMessageHandler`) has `destination-expression` and `socket-expression` options.
You can use the `destination-expression` as a runtime alternative to the hardcoded `host`-`port` pair to determine the destination address for the outgoing datagram packet against a `requestMessage` (with the root object for the evaluation context).
The expression must evaluate to an `URI`, a `String` in the URI style (see http://www.ietf.org/rfc/rfc2396.txt[RFC-2396]), or a `SocketAddress`.
The expression must evaluate to an `URI`, a `String` in the URI style (see https://www.ietf.org/rfc/rfc2396.txt[RFC-2396]), or a `SocketAddress`.
You can also use the inbound `IpHeaders.PACKET_ADDRESS` header for this expression.
In the framework, the `DatagramPacketMessageMapper` populates this header when we receive datagrams in the `UnicastReceivingChannelAdapter` and convert them to messages.
The header value is exactly the result of `DatagramPacket.getSocketAddress()` of the incoming datagram.

View File

@@ -619,7 +619,7 @@ If you want to execute stored functions instead, the following databases are ful
=====
Even though your particular database may not be fully supported, chances are that you can use the stored procedure Spring Integration components quite successfully anyway, provided your RDBMS supports stored procedures or stored functions.
As a matter of fact, some of the provided integration tests use the http://www.h2database.com/[H2 database].
As a matter of fact, some of the provided integration tests use the https://www.h2database.com/[H2 database].
Nevertheless, it is very important to thoroughly test those usage scenarios.
=====

View File

@@ -32,14 +32,14 @@ The outbound channel adapter uses the `JmsTemplate` to convert and send a JMS me
By using `JmsTemplate` and the `MessageListener` container, Spring Integration relies on Spring's JMS support.
This is important to understand, since most of the attributes exposed on these adapters configure the underlying `JmsTemplate` and `MessageListener` container.
For more details about `JmsTemplate` and the `MessageListener` container, see the http://docs.spring.io/spring/docs/current/spring-framework-reference/html/jms.html[Spring JMS documentation].
For more details about `JmsTemplate` and the `MessageListener` container, see the https://docs.spring.io/spring/docs/current/spring-framework-reference/html/jms.html[Spring JMS documentation].
Whereas the JMS channel adapters are intended for unidirectional messaging (send-only or receive-only), Spring Integration also provides inbound and outbound JMS Gateways for request and reply operations.
The inbound gateway relies on one of Spring's `MessageListener` container implementations for message-driven reception.
It is also capable of sending a return value to the `reply-to` destination, as provided by the received message.
The outbound gateway sends a JMS message to a `request-destination` (or `request-destination-name` or `request-destination-expression`) and then receives a reply message.
You can explicitly configure the `reply-destination` reference (or `reply-destination-name` or `reply-destination-expression`).
Otherwise, the outbound gateway uses a JMS http://docs.oracle.com/javaee/6/api/javax/jms/TemporaryQueue.html[TemporaryQueue].
Otherwise, the outbound gateway uses a JMS https://docs.oracle.com/javaee/6/api/javax/jms/TemporaryQueue.html[TemporaryQueue].
Prior to Spring Integration 2.2, if necessary, a `TemporaryQueue` was created (and removed) for each request or reply.
Beginning with Spring Integration 2.2, you can configure the outbound gateway to use a `MessageListener` container to receive replies instead of directly using a new (or cached) `Consumer` to receive the reply for each request.
@@ -361,25 +361,21 @@ The following example shows a reply listener with default attributes:
The listener is very lightweight, and we anticipate that, in most cases, you need only a single consumer.
However, you can add attributes such as `concurrent-consumers`, `max-concurrent-consumers`, and others.
See the schema for a complete list of supported attributes, together with the http://docs.spring.io/spring/docs/current/spring-framework-reference/html/jms.html[Spring JMS documentation] for their meanings.
See the schema for a complete list of supported attributes, together with the https://docs.spring.io/spring/docs/current/spring-framework-reference/html/jms.html[Spring JMS documentation] for their meanings.
==== Idle Reply Listeners
Starting with version 4.2, you can start the reply listener as needed (and stop it after an idle time) instead
of running for the duration of the gateway's lifecycle.
Starting with version 4.2, you can start the reply listener as needed (and stop it after an idle time) instead of running for the duration of the gateway's lifecycle.
This can be useful if you have many gateways in the application context where they are mostly idle.
One such situation is a context with many (inactive) partitioned http://projects.spring.io/spring-batch/[Spring Batch]
jobs using Spring Integration and JMS for partition distribution.
One such situation is a context with many (inactive) partitioned https://spring.io/projects/spring-batch[Spring Batch] jobs using Spring Integration and JMS for partition distribution.
If all the reply listeners are active, the JMS broker has an active consumer for each gateway.
By enabling the idle timeout, each consumer exists only while the corresponding batch job is running (and
for a short time after it finishes).
By enabling the idle timeout, each consumer exists only while the corresponding batch job is running (and for a short time after it finishes).
See `idle-reply-listener-timeout` in <<jms-og-attributes>>.
==== Gateway Reply Correlation
This section describes the mechanisms used for reply correlation (ensuring the originating gateway receives replies
to only its requests), depending on how the gateway is configured.
This section describes the mechanisms used for reply correlation (ensuring the originating gateway receives replies to only its requests), depending on how the gateway is configured.
See <<jms-og-attributes>> for complete description of the attributes discussed here.
The following list describes the various scenarios (the numbers are for identification -- order does not matter):
@@ -486,13 +482,11 @@ The gateway does not initialize with this configuration.
[[jms-async-gateway]]
==== Async Gateway
Starting with version 4.3, you can now specify `async="true"` (or `setAsync(true)` in Java) when configuring the outbound
gateway.
Starting with version 4.3, you can now specify `async="true"` (or `setAsync(true)` in Java) when configuring the outbound gateway.
By default, when a request is sent to the gateway, the requesting thread is suspended until the reply is received.
The flow then continues on that thread.
If `async` is `true`, the requesting thread is released immediately after the send completes, and the reply is returned
(and the flow continues) on the listener container thread.
If `async` is `true`, the requesting thread is released immediately after the send completes, and the reply is returned (and the flow continues) on the listener container thread.
This can be useful when the gateway is invoked on a poller thread.
The thread is released and is available for other tasks within the framework.
@@ -630,8 +624,7 @@ IMPORTANT: Since version 4.0, the `JMSPriority` header is mapped to the standard
(previously, the `priority` header was only used for outbound messages).
To revert to the previous behavior (that is, to not map the inbound priority), set the `mapInboundPriority` property of `DefaultJmsHeaderMapper` to `false`.
IMPORTANT: Since version 4.3, the `DefaultJmsHeaderMapper` maps the standard `correlationId` header as a message
property by invoking its `toString()` method (`correlationId` is often a `UUID`, which is not supported by JMS).
IMPORTANT: Since version 4.3, the `DefaultJmsHeaderMapper` maps the standard `correlationId` header as a message property by invoking its `toString()` method (`correlationId` is often a `UUID`, which is not supported by JMS).
On the inbound side, it is mapped as a `String`.
This is independent of the `jms_correlationId` header, which is mapped to and from the `JMSCorrelationID` header.
The `JMSCorrelationID` is generally used to correlate requests and replies, whereas the `correlationId` is often used to combine related messages into a group (such as with an aggregator or a resequencer).
@@ -761,7 +754,7 @@ Use `subscription` to name the subscription.
[[jms-selectors]]
=== Using JMS Message Selectors
With JMS message selectors, you can filter http://docs.oracle.com/javaee/6/api/javax/jms/Message.html[JMS Messages] based on JMS headers as well as JMS properties.
With JMS message selectors, you can filter https://docs.oracle.com/javaee/6/api/javax/jms/Message.html[JMS Messages] based on JMS headers as well as JMS properties.
For example, if you want to listen to messages whose custom JMS header property, `myHeaderProperty`, equals `something`, you can specify the following expression:
====
@@ -771,7 +764,7 @@ myHeaderProperty = 'something'
----
====
Message selector expressions are a subset of the http://en.wikipedia.org/wiki/SQL-92[SQL-92] conditional expression syntax and are defined as part of the http://download.oracle.com/otn-pub/jcp/7195-jms-1.1-fr-spec-oth-JSpec/jms-1_1-fr-spec.pdf[Java Message Service] specification (Version 1.1, April 12, 2002).
Message selector expressions are a subset of the https://en.wikipedia.org/wiki/SQL-92[SQL-92] conditional expression syntax and are defined as part of the https://download.oracle.com/otn-pub/jcp/7195-jms-1.1-fr-spec-oth-JSpec/jms-1_1-fr-spec.pdf[Java Message Service] specification (Version 1.1, April 12, 2002).
Specifically, see chapter "3.8, Message Selection".
It contains a detailed explanation of the expressions syntax.
@@ -792,7 +785,7 @@ To experiment with these JMS adapters, check out the JMS samples available in th
That repository includes two samples.
One provides inbound and outbound channel adapters, and the other provides inbound and outbound gateways.
They are configured to run with an embedded http://activemq.apache.org/[ActiveMQ] process, but you can modify the https://github.com/SpringSource/spring-integration-samples/blob/master/basic/jms/src/main/resources/META-INF/spring/integration/common.xml[common.xml] Spring application context file of each sample to support either a different JMS provider or a standalone ActiveMQ process.
They are configured to run with an embedded https://activemq.apache.org/[ActiveMQ] process, but you can modify the https://github.com/SpringSource/spring-integration-samples/blob/master/basic/jms/src/main/resources/META-INF/spring/integration/common.xml[common.xml] Spring application context file of each sample to support either a different JMS provider or a standalone ActiveMQ process.
In other words, you can split the configuration so that the inbound and outbound adapters run in separate JVMs.
If you have ActiveMQ installed, modify the `brokerURL` property within the common.xml file to use `tcp://localhost:61616` (instead of `vm://localhost`).

View File

@@ -326,7 +326,7 @@ Fall back to the `toString()` method of the object being monitored (handler or s
You can append custom elements to the object name by providing a reference to a `Properties` object in the `object-name-static-properties` attribute.
Also, since Spring Integration 3.0, you can use a custom http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/jmx/export/naming/ObjectNamingStrategy.html[`ObjectNamingStrategy`] by setting the `object-naming-strategy` attribute.
Also, since Spring Integration 3.0, you can use a custom https://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/jmx/export/naming/ObjectNamingStrategy.html[`ObjectNamingStrategy`] by setting the `object-naming-strategy` attribute.
Doing so permits greater control over the naming of the MBeans, such as grouping all integration MBeans under an 'Integration' type.
The following example shows one possible custom naming strategy implementation:
@@ -350,7 +350,7 @@ The `beanKey` argument is a `String` that contain the standard object name, begi
The preceding example moves the standard `type` part to `componentType` and sets the `type` to 'Integration', enabling selection of all Integration MBeans in one query:`"my.domain:type=Integration,*`.
Doing so also groups the beans under one tree entry under the domain in such tools as VisualVM.
NOTE: The default naming strategy is a http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/jmx/export/naming/MetadataNamingStrategy.html[`MetadataNamingStrategy`].
NOTE: The default naming strategy is a https://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/jmx/export/naming/MetadataNamingStrategy.html[`MetadataNamingStrategy`].
The exporter propagates the `default-domain` to that object to let it generate a fallback object name if parsing of the bean key fails.
If your custom naming strategy is a `MetadataNamingStrategy` (or a subclass of it), the exporter does not propagate the `default-domain`.
You must configure it on your strategy bean.

View File

@@ -136,7 +136,7 @@ You must provide this attribute, the `entity-manager-factory` attribute, or the
NOTE: Usually, your Spring application context defines only a JPA entity manager factory, and the `EntityManager` is injected by using the `@PersistenceContext` annotation.
This approach does not apply for the Spring Integration JPA components.
Usually, injecting the JPA entity manager factory is best, but, when you want to inject an `EntityManager` explicitly, you have to define a `SharedEntityManagerBean`.
For more information, see the relevant http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/orm/jpa/support/SharedEntityManagerBean.html[Javadoc].
For more information, see the relevant https://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/orm/jpa/support/SharedEntityManagerBean.html[Javadoc].
+
The following example shows how to explicitly include an entity manager factory:
+
@@ -497,7 +497,7 @@ The default value is `MERGE`.
These four attributes of the `outbound-channel-adapter` configure it to accept entities over the input channel and process them to `PERSIST`, `MERGE`, or `DELETE` the entities from the underlying data source.
NOTE: As of Spring Integration 3.0, payloads to `PERSIST` or `MERGE` can also be of type `http://docs.oracle.com/javase/7/docs/api/java/lang/Iterable.html[java.lang.Iterable]`.
NOTE: As of Spring Integration 3.0, payloads to `PERSIST` or `MERGE` can also be of type `https://docs.oracle.com/javase/7/docs/api/java/lang/Iterable.html[java.lang.Iterable]`.
In that case, each object returned by the `Iterable` is treated as an entity and persisted or merged using the underlying `EntityManager`.
Null values returned by the iterator are ignored.
@@ -716,7 +716,7 @@ Relevant only if you use an entity for JPA operations.
Ignored if you provide JPA QL, a named query, or a native query.
It defaults to `MERGE`.
Optional.
As of Spring Integration 3.0, payloads to persist or merge can also be of type `http://docs.oracle.com/javase/7/docs/api/java/lang/Iterable.html[java.lang.Iterable]`.
As of Spring Integration 3.0, payloads to persist or merge can also be of type `https://docs.oracle.com/javase/7/docs/api/java/lang/Iterable.html[java.lang.Iterable]`.
In that case, each object returned by the `Iterable` is treated as an entity and persisted or merged by using the underlying `EntityManager`.
Null values returned by the iterator are ignored.
<13> Set this value to `true` if you want to flush the persistence context immediately after persist, merge, or delete operations and do not want to rely on the `flushMode` of the `EntityManager`.
@@ -1172,7 +1172,7 @@ JSR 317: Java™ Persistence 2.0 states in chapter 4.10, "`Bulk Update and Delet
"`A delete operation only applies to entities of the specified class and its subclasses.
It does not cascade to related entities.`"
For more information, see http://jcp.org/en/jsr/detail?id=317[JSR 317: Java™ Persistence 2.0]
For more information, see https://jcp.org/en/jsr/detail?id=317[JSR 317: Java™ Persistence 2.0]
====
[[outboundGatewaySamples]]

View File

@@ -95,7 +95,6 @@ Normally, when the `IMAPMessage.getContent()` method is called, certain headers
====
====
---
[source]
----
To: thing1@things.com
@@ -206,9 +205,9 @@ To use it, configure the following schema locations:
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:int-mail="http://www.springframework.org/schema/integration/mail"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
https://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/integration/mail
http://www.springframework.org/schema/integration/mail/spring-integration-mail.xsd">
https://www.springframework.org/schema/integration/mail/spring-integration-mail.xsd">
----
====

View File

@@ -1,11 +1,11 @@
[[message-store]]
=== Message Store
The http://www.eaipatterns.com[_Enterprise Integration Patterns_] (EIP) book identifies several patterns that have the ability to buffer messages.
The https://www.enterpriseintegrationpatterns.com/[_Enterprise Integration Patterns_] (EIP) book identifies several patterns that have the ability to buffer messages.
For example, an aggregator buffers messages until they can be released, and a `QueueChannel` buffers messages until consumers explicitly receive those messages from that channel.
Because of the failures that can occur at any point within your message flow, EIP components that buffer messages also introduce a point where messages could be lost.
To mitigate the risk of losing messages, EIP defines the http://eaipatterns.com/MessageStore.html[message store] pattern, which lets EIP components store messages, typically in some type of persistent store (such as an RDBMS).
To mitigate the risk of losing messages, EIP defines the https://www.enterpriseintegrationpatterns.com/MessageStore.html[message store] pattern, which lets EIP components store messages, typically in some type of persistent store (such as an RDBMS).
Spring Integration provides support for the message store pattern by:
@@ -137,6 +137,7 @@ use a custom `release-strategy` similar to the following:
It produces results similar to the following for 1000 simple messages:
====
[source]
----
...
StopWatch 'Lazy-Load Performance': running time (millis) = 38918

View File

@@ -2,7 +2,7 @@
=== Metadata Store
Many external systems, services, or resources are not transactional (Twitter, RSS, file systems, and so on), and there is no any ability to mark the data as read.
Also, sometimes, you may need to implement the Enterprise Integration Pattern http://eaipatterns.com/IdempotentReceiver.html[idempotent receiver] in some integration solutions.
Also, sometimes, you may need to implement the Enterprise Integration Pattern https://www.enterpriseintegrationpatterns.com/IdempotentReceiver.html[idempotent receiver] in some integration solutions.
To achieve this goal and store some previous state of the endpoint before the next interaction with external system or to deal with the next message, Spring Integration provides the metadata store component as an an implementation of the `org.springframework.integration.metadata.MetadataStore` interface with a general key-value contract.
The metadata store is designed to store various types of generic metadata (for example, the published date of the last feed entry that has been processed) to help components such as the feed adapter deal with duplicates.
@@ -20,7 +20,7 @@ If you need to persist metadata between application context restarts, the framew
* <<redis-metadata-store>>
* <<zk-metadata-store>>
The `PropertiesPersistingMetadataStore` is backed by a properties file and a http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/util/PropertiesPersister.html[`PropertiesPersister`].
The `PropertiesPersistingMetadataStore` is backed by a properties file and a https://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/util/PropertiesPersister.html[`PropertiesPersister`].
By default, it persists only the state when the application context is closed normally.
It implements `Flushable` so that you can persist the state at will, by invoking `flush()`.
@@ -41,7 +41,7 @@ These provide for atomic updates and can be used across multiple component or ap
[[idempotent-receiver-pattern]]
==== Idempotent Receiver and Metadata Store
The metadata store is useful for implementing the EIP http://eaipatterns.com/IdempotentReceiver.html[idempotent receiver] pattern when there is need to filter an incoming message if it has already been processed and you can discard it or perform some other logic on discarding.
The metadata store is useful for implementing the EIP https://www.enterpriseintegrationpatterns.com/IdempotentReceiver.html[idempotent receiver] pattern when there is need to filter an incoming message if it has already been processed and you can discard it or perform some other logic on discarding.
The following configuration shows an example of how to do so:
====

View File

@@ -2,7 +2,7 @@
=== Metrics and Management
This section describes how to capture metrics for Spring Integration.
In recent versions, we have relied more on Micrometer (see http://micrometer.io), and we plan to use Micrometer even more in future releases.
In recent versions, we have relied more on Micrometer (see https://micrometer.io), and we plan to use Micrometer even more in future releases.
[[configuring-metrics-capture]]
==== Configuring Metrics Capture

View File

@@ -1,7 +1,7 @@
[[mongodb]]
== MongoDb Support
Version 2.1 introduced support for http://www.mongodb.org/[MongoDB]: a "`high-performance, open source, document-oriented database`".
Version 2.1 introduced support for https://www.mongodb.org/[MongoDB]: a "`high-performance, open source, document-oriented database`".
You need to include this dependency into your project:
@@ -23,13 +23,13 @@ compile "org.springframework.integration:spring-integration-mongodb:{project-ver
----
====
To download, install, and run MongoDB, see the http://www.mongodb.org/downloads[MongoDB documentation].
To download, install, and run MongoDB, see the https://www.mongodb.org/downloads[MongoDB documentation].
[[mongodb-connection]]
=== Connecting to MongoDb
To begin interacting with MongoDB, you first need to connect to it.
Spring Integration builds on the support provided by another Spring project, http://projects.spring.io/spring-data-mongodb/[Spring Data MongoDB].
Spring Integration builds on the support provided by another Spring project, https://projects.spring.io/spring-data-mongodb/[Spring Data MongoDB].
It provides a factory class called `MongoDbFactory`, which simplifies integration with the MongoDB Client API.
==== Using `MongoDbFactory`
@@ -88,14 +88,14 @@ The following example shows how to use `SimpleMongoDbFactory` in XML configurati
`SimpleMongoDbFactory` takes two arguments: a `Mongo` instance and a `String` that specifies the name of the database.
If you need to configure properties such as `host`, `port`, and others, you can pass those by using one of the constructors provided by the underlying `Mongo` class.
For more information on how to configure MongoDB, see the http://docs.spring.io/spring-data/data-mongo/docs/current/reference/html/[Spring-Data-MongoDB] reference.
For more information on how to configure MongoDB, see the https://docs.spring.io/spring-data/data-mongo/docs/current/reference/html/[Spring-Data-MongoDB] reference.
[[mongodb-message-store]]
=== MongoDB Message Store
As described in the _Enterprise Integration Patterns_ (EIP) book, a http://www.eaipatterns.com/MessageStore.html[Message Store] lets you persist messages.
As described in the _Enterprise Integration Patterns_ (EIP) book, a https://www.enterpriseintegrationpatterns.com/MessageStore.html[Message Store] lets you persist messages.
Doing so can be useful when dealing with components that have the ability to buffer messages (`QueueChannel`, `aggregator`, `resequencer`, and others.) if reliability is a concern.
In Spring Integration, the `MessageStore` strategy also provides the foundation for the http://www.eaipatterns.com/StoreInLibrary.html[claim check] pattern, which is described in EIP as well.
In Spring Integration, the `MessageStore` strategy also provides the foundation for the https://www.enterpriseintegrationpatterns.com/StoreInLibrary.html[claim check] pattern, which is described in EIP as well.
Spring Integration's MongoDB module provides the `MongoDbMessageStore`, which is an implementation of both the `MessageStore` strategy (mainly used by the claim check pattern) and the `MessageGroupStore` strategy (mainly used by the aggregator and resequencer patterns).
@@ -224,7 +224,7 @@ The following example shows how to configure a MongoDB inbound channel adapter:
As the preceding configuration shows, you configure a MongoDb inbound channel adapter by using the `inbound-channel-adapter` element and providing values for various attributes, such as:
* `query`: A JSON query (see http://www.mongodb.org/display/DOCS/Querying[MongoDB Querying])
* `query`: A JSON query (see https://www.mongodb.org/display/DOCS/Querying[MongoDB Querying])
* `query-expression`: A SpEL expression that is evaluated to a JSON query string (as the `query` attribute above) or to an instance of `o.s.data.mongodb.core.query.Query`.
Mutually exclusive with the `query` attribute.
* `entity-class`: The type of the payload object.
@@ -366,7 +366,7 @@ NOTE: you can not set both `mongo-template` and `mongodb-factory`.
* `entity-class`: The fully qualified name of the entity class to be passed to the `find(..)` and `findOne(..)` methods in MongoTemplate.
If this attribute is not provided, the default value is `org.bson.Document`.
* `query` or `query-expression`: Specifies the MongoDB query.
See the http://www.mongodb.org/display/DOCS/Querying[MongoDB documentation] for more query samples.
See the https://www.mongodb.org/display/DOCS/Querying[MongoDB documentation] for more query samples.
* `collection-callback`: Reference to an instance of `org.springframework.data.mongodb.core.CollectionCallback`.
Preferable an instance of `o.s.i.mongodb.outbound.MessageCollectionCallback` since 5.0.11 with the request message context.
See its Javadocs for more information.

View File

@@ -23,7 +23,7 @@ compile "org.springframework.integration:spring-integration-mqtt:{project-versio
----
====
The current implementation uses the http://www.eclipse.org/paho/[Eclipse Paho MQTT Client] library.
The current implementation uses the https://www.eclipse.org/paho/[Eclipse Paho MQTT Client] library.
Configuration of both adapters is achieved using the `DefaultMqttPahoClientFactory`.
Refer to the Paho documentation for more information about configuration options.

View File

@@ -27,7 +27,7 @@ Business components are further isolated from the infrastructure, and developers
As an extension of the Spring programming model, Spring Integration provides a wide variety of configuration options, including annotations, XML with namespace support, XML with generic "`bean`" elements, and direct usage of the underlying API.
That API is based upon well defined strategy interfaces and non-invasive, delegating adapters.
Spring Integration's design is inspired by the recognition of a strong affinity between common patterns within Spring and the well known patterns described in http://www.eaipatterns.com[_Enterprise Integration Patterns_], by Gregor Hohpe and Bobby Woolf (Addison Wesley, 2004).
Spring Integration's design is inspired by the recognition of a strong affinity between common patterns within Spring and the well known patterns described in https://www.enterpriseintegrationpatterns.com/[_Enterprise Integration Patterns_], by Gregor Hohpe and Bobby Woolf (Addison Wesley, 2004).
Developers who have read that book should be immediately comfortable with the Spring Integration concepts and terminology.
[[overview-goalsandprinciples]]
@@ -118,7 +118,7 @@ This is similar to the role of a controller in the MVC paradigm.
Just as a controller handles HTTP requests, the message endpoint handles messages.
Just as controllers are mapped to URL patterns, message endpoints are mapped to message channels.
The goal is the same in both cases: isolate application code from the infrastructure.
These concepts and all of the patterns that follow are discussed at length in the http://www.eaipatterns.com[_Enterprise Integration Patterns_] book.
These concepts and all of the patterns that follow are discussed at length in the https://www.enterpriseintegrationpatterns.com/[_Enterprise Integration Patterns_] book.
Here, we provide only a high-level description of the main endpoint types supported by Spring Integration and the roles associated with those types.
The chapters that follow elaborate and provide sample code as well as configuration examples.
@@ -397,7 +397,7 @@ The first time a Spring Integration namespace element is encountered, the framew
IMPORTANT: Version 4.0 introduced the `@EnableIntegration` annotation, to allow the
registration of Spring Integration infrastructure beans (see the
http://docs.spring.io/spring-integration/docs/latest-ga/api/org/springframework/integration/config/EnableIntegration.html[Javadoc]).
https://docs.spring.io/spring-integration/docs/latest-ga/api/org/springframework/integration/config/EnableIntegration.html[Javadoc]).
This annotation is required when only Java configuration is used -- for example with Spring Boot or Spring Integration Messaging Annotation support and Spring Integration Java DSL with no XML integration configuration.
The `@EnableIntegration` annotation is also useful when you have a parent context with no Spring Integration components
@@ -747,4 +747,4 @@ public void bar(String bar) { ... }
====
If the `compilerMode` property is omitted, the `spring.expression.compiler.mode` system property determines the compiler mode.
See http://docs.spring.io/spring-framework/docs/current/spring-framework-reference/html/expressions.html#expressions-spel-compilation[SpEL compilation] for more information about compiled SpEL.
See https://docs.spring.io/spring-framework/docs/current/spring-framework-reference/core.html#expressions-spel-compilation[SpEL compilation] for more information about compiled SpEL.

View File

@@ -7,18 +7,18 @@ This section describes how polling works in Spring Integration.
When Message Endpoints (Channel Adapters) are connected to channels and instantiated, they produce one of the following instances:
* http://static.springsource.org/spring-integration/api/org/springframework/integration/endpoint/PollingConsumer.html[`PollingConsumer`]
* http://static.springsource.org/spring-integration/api/org/springframework/integration/endpoint/EventDrivenConsumer.html[`EventDrivenConsumer`]
* https://docs.spring.io/spring-integration/api/org/springframework/integration/endpoint/PollingConsumer.html[`PollingConsumer`]
* https://docs.spring.io/spring-integration/api/org/springframework/integration/endpoint/EventDrivenConsumer.html[`EventDrivenConsumer`]
The actual implementation depends on the type of channel to which these endpoints connect.
A channel adapter connected to a channel that implements the http://docs.spring.io/spring/docs/current/javadoc-api/index.html?org/springframework/messaging/SubscribableChannel.html[`org.springframework.messaging.SubscribableChannel`] interface produces an instance of `EventDrivenConsumer`.
On the other hand, a channel adapter connected to a channel that implements the http://docs.spring.io/spring/docs/current/javadoc-api/index.html?org/springframework/messaging/PollableChannel.html[`org.springframework.messaging.PollableChannel`] interface (such as a `QueueChannel`) produces an instance of `PollingConsumer`.
A channel adapter connected to a channel that implements the https://docs.spring.io/spring/docs/current/javadoc-api/index.html?org/springframework/messaging/SubscribableChannel.html[`org.springframework.messaging.SubscribableChannel`] interface produces an instance of `EventDrivenConsumer`.
On the other hand, a channel adapter connected to a channel that implements the https://docs.spring.io/spring/docs/current/javadoc-api/index.html?org/springframework/messaging/PollableChannel.html[`org.springframework.messaging.PollableChannel`] interface (such as a `QueueChannel`) produces an instance of `PollingConsumer`.
Polling consumers let Spring Integration components actively poll for Messages rather than process messages in an event-driven manner.
They represent a critical cross-cutting concern in many messaging scenarios.
In Spring Integration, polling consumers are based on the pattern with the same name, which is described in the book _Enterprise Integration Patterns_, by Gregor Hohpe and Bobby Woolf.
You can find a description of the pattern on the http://www.enterpriseintegrationpatterns.com/PollingConsumer.html[book's website].
You can find a description of the pattern on the https://www.enterpriseintegrationpatterns.com/PollingConsumer.html[book's website].
[[pollable-message-source]]
==== Pollable Message Source
@@ -28,8 +28,8 @@ When inbound channel adapters are used, these adapters are often wrapped by a `S
For example, when retrieving messages from a remote FTP Server location, the adapter described in <<ftp-inbound>> is configured with a poller to periodically retrieve messages.
So, when components are configured with pollers, the resulting instances are of one of the following types:
* http://static.springsource.org/spring-integration/api/org/springframework/integration/endpoint/PollingConsumer.html[`PollingConsumer`]
* http://static.springsource.org/spring-integration/api/org/springframework/integration/endpoint/SourcePollingChannelAdapter.html[`SourcePollingChannelAdapter`]
* https://docs.spring.io/spring-integration/api/org/springframework/integration/endpoint/PollingConsumer.html[`PollingConsumer`]
* https://docs.spring.io/spring-integration/api/org/springframework/integration/endpoint/SourcePollingChannelAdapter.html[`SourcePollingChannelAdapter`]
This means that pollers are used in both inbound and outbound messaging scenarios.
Here are some use cases in which pollers are used:

View File

@@ -10,7 +10,7 @@ This chapter includes:
[[system-requirements]]
== Requirements
This section details the compatible http://www.oracle.com/technetwork/java/javase/downloads/index.html[Java] and http://www.springsource.org/spring-framework[Spring Framework] versions.
This section details the compatible https://www.oracle.com/technetwork/java/javase/downloads/index.html[Java] and https://spring.io/projects/spring-framework[Spring Framework] versions.
[[supported-java-versions]]
=== Compatible Java Versions
@@ -45,13 +45,13 @@ The following example shows the `int`, `int-event`, and `int-stream` namespaces
xmlns:int-stream="http://www.springframework.org/schema/integration/stream"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
https://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/integration
http://www.springframework.org/schema/integration/spring-integration.xsd
https://www.springframework.org/schema/integration/spring-integration.xsd
http://www.springframework.org/schema/integration/webflux
http://www.springframework.org/schema/integration/webflux/spring-integration-webflux.xsd
https://www.springframework.org/schema/integration/webflux/spring-integration-webflux.xsd
http://www.springframework.org/schema/integration/stream
http://www.springframework.org/schema/integration/stream/spring-integration-stream.xsd">
https://www.springframework.org/schema/integration/stream/spring-integration-stream.xsd">
</beans>
----

View File

@@ -1,8 +1,8 @@
[[redis]]
== Redis Support
Spring Integration 2.1 introduced support for http://redis.io/[Redis]: "`an open source advanced key-value store`".
This support comes in the form of a Redis-based `MessageStore` as well as publish-subscribe messaging adapters that are supported by Redis through its http://redis.io/topics/pubsub[`PUBLISH`, `SUBSCRIBE`, and `UNSUBSCRIBE`] commands.
Spring Integration 2.1 introduced support for https://redis.io/[Redis]: "`an open source advanced key-value store`".
This support comes in the form of a Redis-based `MessageStore` as well as publish-subscribe messaging adapters that are supported by Redis through its https://redis.io/topics/pubsub[`PUBLISH`, `SUBSCRIBE`, and `UNSUBSCRIBE`] commands.
You need to include this dependency into your project:
@@ -26,7 +26,7 @@ compile "org.springframework.integration:spring-integration-redis:{project-versi
You also need to include Redis client dependency, e.g. Lettuce.
To download, install, and run Redis, see the http://redis.io/download[Redis documentation].
To download, install, and run Redis, see the https://redis.io/download[Redis documentation].
[[redis-connection]]
=== Connecting to Redis
@@ -176,7 +176,7 @@ Inbound adapters can subscribe to multiple topic names, hence the comma-separate
Since version 3.0, the inbound adapter, in addition to the existing `topics` attribute, now has the `topic-patterns` attribute.
This attribute contains a comma-separated set of Redis topic patterns.
For more information regarding Redis publish-subscribe, see http://redis.io/topics/pubsub[Redis Pub/Sub].
For more information regarding Redis publish-subscribe, see https://redis.io/topics/pubsub[Redis Pub/Sub].
Inbound adapters can use a `RedisSerializer` to deserialize the body of Redis messages.
The `serializer` attribute of the `<int-redis:inbound-channel-adapter>` can be set to an empty string, which results in a `null` value for the `RedisSerializer` property.
@@ -341,9 +341,9 @@ Handling these events with an `<int-event:inbound-channel-adapter/>` can be usef
[[redis-message-store]]
=== Redis Message Store
As described in the _Enterprise Integration Patterns_ (EIP) book, a http://www.eaipatterns.com/MessageStore.html[message store] lets you persist messages.
As described in the _Enterprise Integration Patterns_ (EIP) book, a https://www.enterpriseintegrationpatterns.com/MessageStore.html[message store] lets you persist messages.
This can be useful when dealing with components that have a capability to buffer messages (aggregator, resequencer, and others) when reliability is a concern.
In Spring Integration, the `MessageStore` strategy also provides the foundation for the http://www.eaipatterns.com/StoreInLibrary.html[claim check] pattern, which is described in EIP as well.
In Spring Integration, the `MessageStore` strategy also provides the foundation for the https://www.enterpriseintegrationpatterns.com/StoreInLibrary.html[claim check] pattern, which is described in EIP as well.
Spring Integration's Redis module provides the `RedisMessageStore`.
The following example shows how to use it with a aggregator:
@@ -421,7 +421,7 @@ They can be used only for situations such as backing a `QueueChannel`.
[[redis-metadata-store]]
=== Redis Metadata Store
Spring Integration 3.0 introduced a new Redis-based http://docs.spring.io/spring-integration/docs/latest-ga/api/org/springframework/integration/metadata/MetadataStore.html[`MetadataStore`] (see <<metadata-store>>) implementation.
Spring Integration 3.0 introduced a new Redis-based https://docs.spring.io/spring-integration/docs/latest-ga/api/org/springframework/integration/metadata/MetadataStore.html[`MetadataStore`] (see <<metadata-store>>) implementation.
You can use the `RedisMetadataStore` to maintain the state of a `MetadataStore` across application restarts.
You can use this new `MetadataStore` implementation with adapters such as:
@@ -444,8 +444,8 @@ The following example shows how to declare such a bean:
----
====
The `RedisMetadataStore` is backed by http://docs.spring.io/spring-data/data-redis/docs/current/api/org/springframework/data/redis/support/collections/RedisProperties.html[`RedisProperties`].
Interaction with it uses http://docs.spring.io/spring-data/data-redis/docs/current/api/org/springframework/data/redis/core/BoundHashOperations.html[`BoundHashOperations`], which, in turn, requires a `key` for the entire `Properties` store.
The `RedisMetadataStore` is backed by https://docs.spring.io/spring-data/data-redis/docs/current/api/org/springframework/data/redis/support/collections/RedisProperties.html[`RedisProperties`].
Interaction with it uses https://docs.spring.io/spring-data/data-redis/docs/current/api/org/springframework/data/redis/core/BoundHashOperations.html[`BoundHashOperations`], which, in turn, requires a `key` for the entire `Properties` store.
In the case of the `MetadataStore`, this `key` plays the role of a region, which is useful in a distributed environment, when several applications use the same Redis server.
By default, this `key` has a value of `MetaData`.
@@ -668,7 +668,7 @@ The `Message` payload should have a name of `redisCounter`, which may be provide
The `RedisConnection#execute` method has a generic `Object` as its return type.
Real result depends on command type.
For example, `MGET` returns a `List<byte[]>`.
For more information about commands, their arguments and result type, see http://redis.io/commands[Redis Specification].
For more information about commands, their arguments and result type, see https://redis.io/commands[Redis Specification].
[[redis-queue-outbound-gateway]]
=== Redis Queue Outbound Gateway

View File

@@ -1,5 +1,5 @@
[[resources]]
== Additional Resources
The definitive source of information about Spring Integration is the http://projects.spring.io/spring-integration/[Spring Integration Home] at http://spring.io[http://spring.io].
The definitive source of information about Spring Integration is the https://projects.spring.io/spring-integration/[Spring Integration Home] at https://spring.io[https://spring.io].
That site serves as a hub of information and is the best place to find up-to-date announcements about the project as well as links to articles, blogs, and new sample applications.

View File

@@ -972,8 +972,8 @@ In the above configuration, if the message includes a header with a name of 'cha
You may also find collection projection and collection selection expressions useful when you need to select multiple channels.
For further information, see:
* http://static.springsource.org/spring/docs/current/spring-framework-reference/html/expressions.html#expressions-collection-projection[Collection Projection]
* http://static.springsource.org/spring/docs/current/spring-framework-reference/html/expressions.html#expressions-collection-selection[Collection Selection]
* https://docs.spring.io/spring-framework/docs/current/spring-framework-reference/core.html#expressions-collection-projection[Collection Projection]
* https://docs.spring.io/spring-framework/docs/current/spring-framework-reference/core.html#expressions-collection-selection[Collection Selection]
[[router-annotation]]
===== Configuring a Router with Annotations
@@ -1035,7 +1035,7 @@ As another example, you may want to introduce more granularity to your message f
Unfortunately, with static router configuration to accomplish either of those goals, you would have to bring down your entire application, change the configuration of the router (change routes), and bring the application back up.
This is obviously not a solution anyone wants.
The http://www.eaipatterns.com/DynamicRouter.html[dynamic router] pattern describes the mechanisms by which you can change or configure routers dynamically without bringing down the system or individual routers. 
The https://www.enterpriseintegrationpatterns.com/DynamicRouter.html[dynamic router] pattern describes the mechanisms by which you can change or configure routers dynamically without bringing down the system or individual routers. 
Before we get into the specifics of how Spring Integration supports dynamic routing, we need to consider the typical flow of a router:
@@ -1126,7 +1126,7 @@ It also means that you could expose these same configuration options through JMX
[[dynamic-routers-control-bus]]
===== Manage Router Mappings using the Control Bus
One way to manage the router mappings is through the http://www.eaipatterns.com/ControlBus.html[control bus] pattern, which exposes a control channel to which you can send control messages to manage and monitor Spring Integration components, including routers.
One way to manage the router mappings is through the https://www.enterpriseintegrationpatterns.com/ControlBus.html[control bus] pattern, which exposes a control channel to which you can send control messages to manage and monitor Spring Integration components, including routers.
NOTE: For more information about the control bus, see <<control-bus>>.
@@ -1169,7 +1169,7 @@ NOTE: For more information about Spring Integration's JMX support, see <<jmx>>.
[[routing-slip]]
===== Routing Slip
Starting with version 4.1, Spring Integration provides an implementation of the http://www.eaipatterns.com/RoutingTable.html[routing slip] enterprise integration pattern.
Starting with version 4.1, Spring Integration provides an implementation of the https://www.enterpriseintegrationpatterns.com/RoutingTable.html[routing slip] enterprise integration pattern.
It is implemented as a `routingSlip` message header, which is used to determine the next channel in `AbstractMessageProducingHandler` instances, when an `outputChannel` is not specified for the endpoint.
This pattern is useful in complex, dynamic cases, when it can become difficult to configure multiple routers to determine message flow.
When a message arrives at an endpoint that has no `output-channel`, the `routingSlip` is consulted to determine the next channel to which the message is sent.
@@ -1260,7 +1260,7 @@ The `routingSlipIndex` remains unchanged.
[[process-manager]]
===== Process Manager Enterprise Integration Pattern
Enterprise integration patterns include the http://www.eaipatterns.com/ProcessManager.html[process manager] pattern.
Enterprise integration patterns include the https://www.enterpriseintegrationpatterns.com/ProcessManager.html[process manager] pattern.
You can now easily implement this pattern by using custom process manager logic encapsulated in a `RoutingSlipRouteStrategy` within the routing slip.
In addition to a bean name, the `RoutingSlipRouteStrategy` can return any `MessageChannel` object, and there is no requirement that this `MessageChannel` instance be a bean in the application context.
This way, we can provide powerful dynamic routing logic when there is no way to predict which channel should be used.

View File

@@ -21,11 +21,11 @@ You can find the repository at:
https://github.com/SpringSource/spring-integration-samples[https://github.com/SpringSource/spring-integration-samples]
In order to check out or clone the samples, you must have a Git client installed on your system.
There are several GUI-based products available for many platforms (such as http://eclipse.org/egit/[EGit] for the Eclipse IDE).
There are several GUI-based products available for many platforms (such as https://eclipse.org/egit/[EGit] for the Eclipse IDE).
A simple Google search can help you find them.
You can also use the command line interface for <<http://git-scm.com/,Git>>.
You can also use the command line interface for <<https://git-scm.com/,Git>>.
NOTE: If you need more information on how to install or use Git, visit: http://git-scm.com/[http://git-scm.com/].
NOTE: If you need more information on how to install or use Git, visit: https://git-scm.com/[https://git-scm.com/].
To clone (check out) the Spring Integration samples repository by using the Git command line tool, issue the following command:
@@ -55,7 +55,7 @@ We greatly appreciate any effort toward improving the samples, including the sha
[[samples-how-can-i-contribute]]
==== How Can I Contribute My Own Samples?
Github is for social coding: if you want to submit your own code examples to the Spring Integration Samples project, we encourage contributions through http://help.github.com/send-pull-requests/[pull requests] from http://help.github.com/fork-a-repo/[forks] of this repository.
Github is for social coding: if you want to submit your own code examples to the Spring Integration Samples project, we encourage contributions through https://help.github.com/en/articles/creating-a-pull-request/[pull requests] from https://help.github.com/en/articles/fork-a-repo[forks] of this repository.
If you want to contribute code this way, please reference, if possible, a https://jira.springframework.org/browse/INTSAMPLES[JIRA ticket] that provides some details regarding your sample.
[IMPORTANT]
@@ -141,7 +141,8 @@ In this section, you can find details on samples that we believe require special
[[samples-loan-broker]]
==== Loan Broker
This section covers the loan broker sample application that is included in the Spring Integration samples. This sample is inspired by one of the samples featured in Gregor Hohpe and Bobby Woolf's book, http://www.eaipatterns.com[_Enterprise Integration Patterns_].
This section covers the loan broker sample application that is included in the Spring Integration samples. 
This sample is inspired by one of the samples featured in Gregor Hohpe and Bobby Woolf's book, https://www.enterpriseintegrationpatterns.com/[_Enterprise Integration Patterns_].
The following diagram shows the entire process:
@@ -282,7 +283,7 @@ The following example shows how to define an aggregator:
====
Our Loan Broker defines a 'quotesAggregator' bean with the `<aggregator>` element, which provides a default aggregation and correlation strategy.
The default correlation strategy correlates messages based on the `correlationId` header (see http://www.enterpriseintegrationpatterns.com/patterns/messaging/CorrelationIdentifier.html[the correlation identifier pattern in the EIP book]).
The default correlation strategy correlates messages based on the `correlationId` header (see https://www.enterpriseintegrationpatterns.com/patterns/messaging/CorrelationIdentifier.html[the correlation identifier pattern in the EIP book]).
Note that we never provided the value for this header.
It was automatically set earlier by the router, when it generated a separate message for each bank channel.
@@ -312,7 +313,8 @@ Our goal is to make is so that integrating applications does not require changes
[[samples-cafe]]
==== The Cafe Sample
This section covers the cafe sample application that is included in the Spring Integration samples. This sample is inspired by another sample featured in Gregor Hohpe's http://www.eaipatterns.com/ramblings.html[Ramblings].
This section covers the cafe sample application that is included in the Spring Integration samples. 
This sample is inspired by another sample featured in Gregor Hohpe's https://www.enterpriseintegrationpatterns.com/ramblings.html[Ramblings].
The domain is that of a cafe, and the following diagram depicts the basic flow:
@@ -336,11 +338,11 @@ The following listing shows the XML configuration:
xmlns:beans="http://www.springframework.org/schema/beans"
xmlns:int-stream="http://www.springframework.org/schema/integration/stream"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
https://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/integration
http://www.springframework.org/schema/integration/spring-integration.xsd
https://www.springframework.org/schema/integration/spring-integration.xsd
http://www.springframework.org/schema/integration/stream
http://www.springframework.org/schema/integration/stream/spring-integration-stream.xsd">
https://www.springframework.org/schema/integration/stream/spring-integration-stream.xsd">
<int:gateway id="cafe" service-interface="o.s.i.samples.cafe.Cafe"/>

View File

@@ -1,9 +1,9 @@
[[scatter-gather]]
=== Scatter-Gather
Starting with version 4.1, Spring Integration provides an implementation of the http://www.eaipatterns.com/BroadcastAggregate.html[scatter-gather] enterprise integration pattern.
Starting with version 4.1, Spring Integration provides an implementation of the https://www.enterpriseintegrationpatterns.com/BroadcastAggregate.html[scatter-gather] enterprise integration pattern.
It is a compound endpoint for which the goal is to send a message to the recipients and aggregate the results.
As noted in http://www.eaipatterns.com[_Enterprise Integration Patterns_], it is a component for scenarios such as "`best quote`", where we need to request information from several suppliers and decide which one provides us with the best term for the requested item.
As noted in https://www.enterpriseintegrationpatterns.com/[_Enterprise Integration Patterns_], it is a component for scenarios such as "`best quote`", where we need to request information from several suppliers and decide which one provides us with the best term for the requested item.
Previously, the pattern could be configured by using discrete components.
This enhancement brings more convenient configuration.

View File

@@ -1,7 +1,7 @@
[[scripting]]
=== Scripting Support
Spring Integration 2.1 added support for the http://jcp.org/aboutJava/communityprocess/pr/jsr223/[JSR223 Scripting for Java specification], introduced in Java version 6.
Spring Integration 2.1 added support for the https://www.jcp.org/en/jsr/detail?id=223[JSR223 Scripting for Java specification], introduced in Java version 6.
It lets you use scripts written in any supported language (including Ruby, JRuby, Javascript, and Groovy) to provide the logic for various integration components, similar to the way the Spring Expression Language (SpEL) is used in Spring Integration.
For more information about JSR223, see the https://docs.oracle.com/javase/8/docs/technotes/guides/scripting/prog_guide/api.html[documentation].
@@ -31,7 +31,7 @@ IMPORTANT: Note that this feature requires Java 6 or higher.
In order to use a JVM scripting language, a JSR223 implementation for that language must be included in your class path.
Java 6 natively supports Javascript.
The http://www.groovy-lang.org/[Groovy] and http://jruby.org/[JRuby] projects provide JSR233 support in their standard distributions.
The https://groovy-lang.org/[Groovy] and https://www.jruby.org[JRuby] projects provide JSR233 support in their standard distributions.
IMPORTANT: Various JSR223 language implementations have been developed by third parties.
A particular implementation's compatibility with Spring Integration depends on how well it conforms to the specification and the implementer's interpretation of the specification.

View File

@@ -6,7 +6,7 @@ Moreover, it is critical for distributed systems, such as those built on Enterpr
Messaging independence and loose coupling let target systems communicate with each other with any type of data in the message's `payload`.
We can either trust all those messages or secure our service against "`infecting`" messages.
Spring Integration, together with http://projects.spring.io/spring-security/[Spring Security], provides a simple and comprehensive way to secure message channels, as well as other part of the integration solution.
Spring Integration, together with https://projects.spring.io/spring-security/[Spring Security], provides a simple and comprehensive way to secure message channels, as well as other part of the integration solution.
You need to include this dependency into your project:
@@ -52,13 +52,13 @@ The following example shows how to configure a bean that includes security and h
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:security="http://www.springframework.org/schema/security"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
https://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/security
http://www.springframework.org/schema/security/spring-security.xsd
https://www.springframework.org/schema/security/spring-security.xsd
http://www.springframework.org/schema/integration
http://www.springframework.org/schema/integration/spring-integration.xsd
https://www.springframework.org/schema/integration/spring-integration.xsd
http://www.springframework.org/schema/integration/security
http://www.springframework.org/schema/integration/security/spring-integration-security.xsd">
https://www.springframework.org/schema/integration/security/spring-integration-security.xsd">
<int-security:secured-channels>
<int-security:access-policy pattern="admin.*" send-access="ROLE_ADMIN"/>
@@ -159,7 +159,7 @@ This means that, when the thread that processes the handed-off message finishes
[NOTE]
====
When working with an <<async-gateway,asynchronous gateway>>, you should use an appropriate `AbstractDelegatingSecurityContextSupport` implementation from Spring Security http://docs.spring.io/spring-security/site/docs/current/reference/html/concurrency.html[Concurrency Support], to let security context propagation be ensured over gateway invocation.
When working with an <<async-gateway,asynchronous gateway>>, you should use an appropriate `AbstractDelegatingSecurityContextSupport` implementation from Spring Security https://docs.spring.io/spring-security/site/docs/current/reference/html/servlet-webclient.html#concurrency[Concurrency Support], to let security context propagation be ensured over gateway invocation.
The following example shows how to do so:

View File

@@ -37,7 +37,7 @@ To include the SFTP namespace in your xml configuration, include the following a
----
xmlns:int-sftp="http://www.springframework.org/schema/integration/sftp"
xsi:schemaLocation="http://www.springframework.org/schema/integration/sftp
http://www.springframework.org/schema/integration/sftp/spring-integration-sftp.xsd"
https://www.springframework.org/schema/integration/sftp/spring-integration-sftp.xsd"
----
====
@@ -88,12 +88,12 @@ See <<sftp-jsch-logging>>.
Now all you need to do is inject this SFTP session factory into your adapters.
NOTE: A more practical way to provide values for the SFTP session factory is to use Spring's http://static.springsource.org/spring/docs/current/spring-framework-reference/html/beans.html#beans-factory-placeholderconfigurer[property placeholder support].
NOTE: A more practical way to provide values for the SFTP session factory is to use Spring's https://docs.spring.io/spring/docs/current/spring-framework-reference/core.html#beans-factory-placeholderconfigurer[property placeholder support].
[[sftp-session-factory-properties]]
==== Configuration Properties
The following list describes all the properties that are exposed by the http://static.springsource.org/spring-integration/api/org/springframework/integration/sftp/session/DefaultSftpSessionFactory.html[`DefaultSftpSessionFactory`].
The following list describes all the properties that are exposed by the https://docs.spring.io/spring-integration/api/org/springframework/integration/sftp/session/DefaultSftpSessionFactory.html[`DefaultSftpSessionFactory`].
`isSharedSession` (constructor argument)::When `true`, a single connection is used, and `JSch Channels` are multiplexed.
It defaults to `false`.
@@ -103,7 +103,7 @@ It's default depends on the underlying JSch version but it will look like:_SSH-2
`enableDaemonThread`::If `true`, all threads are daemon threads.
If set to `false`, normal non-daemon threads are used instead.
This property is set on the underlying http://epaul.github.io/jsch-documentation/javadoc/com/jcraft/jsch/Session.html[session].
This property is set on the underlying https://epaul.github.io/jsch-documentation/javadoc/com/jcraft/jsch/Session.html[session].
There, this property defaults to `false`.
`host`::The URL of the host to which you want to connect.
@@ -123,7 +123,7 @@ The password is obtained from that object.
If not specified, this value defaults to `22`.
If specified, this properties must be a positive number.
`privateKey`::Lets you set a http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/core/io/Resource.html[resource] that represents the location of the private key used for authenticating against the remote host.
`privateKey`::Lets you set a https://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/core/io/Resource.html[resource] that represents the location of the private key used for authenticating against the remote host.
If the `privateKey` is not provided, then the `password` property is required.
`privateKeyPassphrase`::The password for the private key.
@@ -131,7 +131,7 @@ If you set `userInfo`, `privateKeyPassphrase` is not allowed .
The passphrase is obtained from that object.
Optional.
`proxy`::Allows for specifying a JSch-based http://epaul.github.com/jsch-documentation/javadoc/com/jcraft/jsch/Proxy.html[proxy].
`proxy`::Allows for specifying a JSch-based https://epaul.github.com/jsch-documentation/javadoc/com/jcraft/jsch/Proxy.html[proxy].
If set, the proxy object is used to create the connection to the remote host through the proxy.
See <<sftp-proxy-factory-bean>> for a convenient way to configure the proxy.
@@ -142,7 +142,7 @@ If not set, this property defaults to `1`.
`sessionConfig`::By using `Properties`, you can set additional configuration setting on the underlying JSch Session.
`socketFactory`:Lets you pass in a http://epaul.github.com/jsch-documentation/javadoc/com/jcraft/jsch/SocketFactory.html[`SocketFactory`].
`socketFactory`::Lets you pass in a https://epaul.github.com/jsch-documentation/javadoc/com/jcraft/jsch/SocketFactory.html[`SocketFactory`].
The socket factory is used to create a socket to the target host.
When a proxy is used, the socket factory is passed to the proxy.
By default, plain TCP sockets are used.
@@ -283,7 +283,7 @@ Spring Integration version 3.0 provides a new abstraction over the `SftpSession`
The template provides methods to send, retrieve (as an `InputStream`), remove, and rename files.
In addition, we provide an `execute` method to let the caller run multiple operations on the session.
In all cases, the template takes care of reliably closing the session.
For more information, see the http://docs.spring.io/spring-integration/api/org/springframework/integration/file/remote/RemoteFileTemplate.html[Javadoc for `RemoteFileTemplate`] There is a subclass for SFTP: https://docs.spring.io/spring-integration/api/org/springframework/integration/sftp/session/SftpRemoteFileTemplate.html[`SftpRemoteFileTemplate`].
For more information, see the https://docs.spring.io/spring-integration/api/org/springframework/integration/file/remote/RemoteFileTemplate.html[Javadoc for `RemoteFileTemplate`] There is a subclass for SFTP: https://docs.spring.io/spring-integration/api/org/springframework/integration/sftp/session/SftpRemoteFileTemplate.html[`SftpRemoteFileTemplate`].
We added additional methods in version 4.1, including `getClientInstance()`.
It provides access to the underlying `ChannelSftp`, which enables access to low-level APIs.

View File

@@ -1,7 +1,7 @@
[[spel]]
== Spring Expression Language (SpEL)
You can configure many Spring Integration components by using expressions written in the http://static.springsource.org/spring-framework/docs/current/spring-framework-reference/html/expressions.html[Spring Expression Language].
You can configure many Spring Integration components by using expressions written in the https://docs.spring.io/spring-framework/docs/current/spring-framework-reference/core.html#expressions[Spring Expression Language].
In most cases, the `#root` object is the `Message`, which has two properties (`headers` and `payload`) that allow such expressions as `payload`, `payload.thing`, `headers['my.header']`, and so on.
@@ -84,7 +84,7 @@ In the following example, SpEL expressions always use the bean factory's class l
=== SpEL Functions
Spring Integration provides namespace support to let you create SpEL custom functions.
You can specify `<spel-function/>` components to provide http://static.springsource.org/spring-framework/docs/current/spring-framework-reference/html/expressions.html#expressions-ref-functions[custom SpEL functions] to the `EvaluationContext` used throughout the framework.
You can specify `<spel-function/>` components to provide https://docs.spring.io/spring-framework/docs/current/spring-framework-reference/core.html#expressions-ref-functions[custom SpEL functions] to the `EvaluationContext` used throughout the framework.
Instead of configuring the factory bean shown earlier, you can add one or more of these components, and the framework automatically adds them to the default `integrationEvaluationContext` factory bean.
For example, suppose you have a useful static method to evaluate XPath.
@@ -132,7 +132,7 @@ Each context has its own instance of the `integrationEvaluationContext` factory
Spring Integration provides the folloiwng standard functions, which are registered with the application context automatically on start up:
* `#jsonPath`: Evaluates a 'jsonPath' on a specified object.
This function invokes `JsonPathUtils.evaluate(...)`, which delegates to the http://code.google.com/p/json-path[Jayway JsonPath library].
This function invokes `JsonPathUtils.evaluate(...)`, which delegates to the https://github.com/json-path/JsonPath[Jayway JsonPath library].
The following listing shows some usage examples:
+
====
@@ -164,7 +164,7 @@ For more information regarding XML and XPath, see <<xml>>.
[[spel-property-accessors]]
=== Property Accessors
Spring Integration provides namespace support to let you create SpEL custom http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/expression/PropertyAccessor.html[`PropertyAccessor`] implementations.
Spring Integration provides namespace support to let you create SpEL custom https://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/expression/PropertyAccessor.html[`PropertyAccessor`] implementations.
You can use the `<spel-property-accessors/>` component to provide a list of custom `PropertyAccessor` instances to the `EvaluationContext` used throughout the framework.
Instead of configuring the factory bean shown earlier, you can add one or more of these components, and the framework automatically adds the accessors to the default `integrationEvaluationContext` factory bean.
The following example shows how to do so:

View File

@@ -9,7 +9,7 @@ Very often, they are upstream producers in a pipeline that includes an aggregato
The API for performing splitting consists of one base class, `AbstractMessageSplitter`.
It is a `MessageHandler` implementation that encapsulates features common to splitters, such as filling in the appropriate message headers (`CORRELATION_ID`, `SEQUENCE_SIZE`, and `SEQUENCE_NUMBER`) on the messages that are produced.
This filling enables tracking down the messages and the results of their processing (in a typical scenario, these headers get copied to the messages that are produced by the various transforming endpoints).
The values can then be used, for example, by a http://www.eaipatterns.com/DistributionAggregate.html[composed message processor].
The values can then be used, for example, by a https://www.enterpriseintegrationpatterns.com/DistributionAggregate.html[composed message processor].
The following example shows an excerpt from `AbstractMessageSplitter`:

View File

@@ -4,7 +4,7 @@
Spring Integration version 4.2 introduced STOMP (Simple Text Orientated Messaging Protocol) client support.
It is based on the architecture, infrastructure, and API from the Spring Framework's messaging module, stomp package.
Spring Integration uses many of Spring STOMP components (such as `StompSession` and `StompClientSupport`).
For more information, see the http://docs.spring.io/spring/docs/current/spring-framework-reference/html/websocket.html#websocket-stomp-client[Spring Framework STOMP Support] chapter in the Spring Framework reference manual.
For more information, see the https://docs.spring.io/spring/docs/current/spring-framework-reference/web.html#websocket-stomp-client[Spring Framework STOMP Support] chapter in the Spring Framework reference manual.
You need to include this dependency into your project:
@@ -69,6 +69,7 @@ The STOMP protocol provides headers as part of its frame.
The entire structure of the STOMP frame has the following format:
====
[source]
----
....
COMMAND
@@ -195,11 +196,11 @@ To include it in your configuration, provide the following namespace declaration
xmlns:int-stomp="http://www.springframework.org/schema/integration/stomp"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
https://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/integration
http://www.springframework.org/schema/integration/spring-integration.xsd
https://www.springframework.org/schema/integration/spring-integration.xsd
http://www.springframework.org/schema/integration/stomp
http://www.springframework.org/schema/integration/stomp/spring-integration-stomp.xsd">
https://www.springframework.org/schema/integration/stomp/spring-integration-stomp.xsd">
...
</beans>
----

View File

@@ -134,9 +134,9 @@ The following schema locations are needed to use it:
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:beans="http://www.springframework.org/schema/beans"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
https://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/integration/stream
http://www.springframework.org/schema/integration/stream/spring-integration-stream.xsd">
https://www.springframework.org/schema/integration/stream/spring-integration-stream.xsd">
----
====

View File

@@ -12,10 +12,10 @@ Testing support is presented by two modules:
`spring-integration-test` aims to help with integration testing and provides a comprehensive high-level API to mock integration components and verify the behavior of individual components, including whole integration flows or only parts of them.
A thorough treatment of testing in the enterprise is beyond the scope of this reference manual.
See the http://www.enterpriseintegrationpatterns.com/docs/TestDrivenEAI.pdf["`Test-Driven Development in Enterprise Integration Projects`"] paper, by Gregor Hohpe and Wendy Istvanick, for a source of ideas and principles for testing your target integration solution.
See the https://www.enterpriseintegrationpatterns.com/docs/TestDrivenEAI.pdf["`Test-Driven Development in Enterprise Integration Projects`"] paper, by Gregor Hohpe and Wendy Istvanick, for a source of ideas and principles for testing your target integration solution.
The Spring Integration Test Framework and test utilities are fully based on existing JUnit, Hamcrest, and Mockito libraries.
The application context interaction is based on the http://docs.spring.io/spring-framework/docs/current/spring-framework-reference/htmlsingle/#testing[Spring test framework].
The application context interaction is based on the https://docs.spring.io/spring-framework/docs/current/spring-framework-reference/testing.html#testing[Spring test framework].
See the documentation for those projects for further information.
Thanks to the canonical implementation of the EIP in Spring Integration Framework and its first-class citizens (such as `MessageChannel`, `Endpoint` and `MessageHandler`), abstractions, and loose coupling principles, you can implement integration solutions of any complexity.

View File

@@ -172,7 +172,7 @@ public interface TransactionSynchronizationProcessor {
----
====
The factory is responsible for creating a http://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/transaction/support/TransactionSynchronization.html[`TransactionSynchronization`] object.
The factory is responsible for creating a https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/transaction/support/TransactionSynchronization.html[`TransactionSynchronization`] object.
You can implement your own or use the one provided by the framework: `DefaultTransactionSynchronizationFactory`.
This implementation returns a `TransactionSynchronization` that delegates to a default implementation of `TransactionSynchronizationProcessor`: `ExpressionEvaluatingTransactionSynchronizationProcessor`.
This processor supports three SpEL expressions: `beforeCommitExpression`, `afterCommitExpression`, and `afterRollbackExpression`.

View File

@@ -5,7 +5,7 @@ Message transformers play a very important role in enabling the loose-coupling o
Rather than requiring every message-producing component to know what type is expected by the next consumer, you can add transformers between those components.
Generic transformers, such as one that converts a `String` to an XML Document, are also highly reusable.
For some systems, it may be best to provide a http://www.eaipatterns.com/CanonicalDataModel.html[canonical data model], but Spring Integration's general philosophy is not to require any particular format.
For some systems, it may be best to provide a https://www.enterpriseintegrationpatterns.com/CanonicalDataModel.html[canonical data model], but Spring Integration's general philosophy is not to require any particular format.
Rather, for maximum flexibility, Spring Integration aims to provide the simplest possible model for extension.
As with the other endpoint types, the use of declarative configuration in XML or Java annotations enables simple POJOs to be adapted for the role of message transformers.
The rest of this chapter describes these configuration options.
@@ -62,7 +62,7 @@ Its `requires-reply` value is `false` by default, but that can be set to `true`
==== Transformers and Spring Expression Language (SpEL)
Like routers, aggregators, and other components, as of Spring Integration 2.0, transformers can also benefit from http://docs.spring.io/spring/docs/current/spring-framework-reference/html/expressions.html[SpEL support] whenever transformation logic is relatively simple.
Like routers, aggregators, and other components, as of Spring Integration 2.0, transformers can also benefit from https://docs.spring.io/spring/docs/current/spring-framework-reference/core.html#expressions[SpEL support] whenever transformation logic is relatively simple.
The following example shows how to use a SpEL expression:
====
@@ -413,7 +413,7 @@ Doing so results in a message with no `content-type` header, unless such a heade
Beginning with version 3.0, the `ObjectToJsonTransformer` adds headers, reflecting the source type, to the message.
Similarly, the `JsonToObjectTransformer` can use those type headers when converting the JSON to an object.
These headers are mapped in the AMQP adapters so that they are entirely compatible with the Spring-AMQP http://docs.spring.io/spring-amqp/api/[`JsonMessageConverter`].
These headers are mapped in the AMQP adapters so that they are entirely compatible with the Spring-AMQP https://docs.spring.io/spring-amqp/api/[`JsonMessageConverter`].
This enables the following flows to work without any special configuration:

View File

@@ -4,7 +4,7 @@
Starting with version 4.1, Spring Integration has WebSocket support.
It is based on the architecture, infrastructure, and API from the Spring Framework's `web-socket` module.
Therefore, many of Spring WebSocket's components (such as `SubProtocolHandler` or `WebSocketClient`) and configuration options (such as `@EnableWebSocketMessageBroker`) can be reused within Spring Integration.
For more information, see the http://docs.spring.io/spring/docs/current/spring-framework-reference/html/#websocket[Spring Framework WebSocket Support] chapter in the Spring Framework reference manual.
For more information, see the https://docs.spring.io/spring/docs/current/spring-framework-reference/web.html#websocket[Spring Framework WebSocket Support] chapter in the Spring Framework reference manual.
You need to include this dependency into your project:
@@ -150,11 +150,11 @@ To include it in your configuration, use the following namespace declaration in
xmlns:int-websocket="http://www.springframework.org/schema/integration/websocket"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
https://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/integration
http://www.springframework.org/schema/integration/spring-integration.xsd
https://www.springframework.org/schema/integration/spring-integration.xsd
http://www.springframework.org/schema/integration/websocket
http://www.springframework.org/schema/integration/websocket/spring-integration-websocket.xsd">
https://www.springframework.org/schema/integration/websocket/spring-integration-websocket.xsd">
...
</beans>
----
@@ -246,7 +246,7 @@ Defaults to `DefaultHandshakeHandler`.
<5> List of one or more factories (`WebSocketHandlerDecoratorFactory`) that decorate the handler used to process WebSocket messages.
This may be useful for some advanced use cases (for example, to allow Spring Security to forcibly close
the WebSocket session when the corresponding HTTP session expires).
See the http://docs.spring.io/spring-session/docs/current/reference/html5/#websocket[Spring Session Project] for more information.
See the https://docs.spring.io/spring-session/docs/current/reference/html5/#websocket[Spring Session Project] for more information.
<6> See the same option on the <<websocket-client-container-attributes,`<int-websocket:client-container>`>>.
<7> See the same option on the <<websocket-client-container-attributes,`<int-websocket:client-container>`>>.
<8> The allowed origin header values.

View File

@@ -156,11 +156,11 @@ To include it in your configuration, include the following namespace declaration
xmlns:int-webflux="http://www.springframework.org/schema/integration/webflux"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
https://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/integration
http://www.springframework.org/schema/integration/spring-integration.xsd
https://www.springframework.org/schema/integration/spring-integration.xsd
http://www.springframework.org/schema/integration/webflux
http://www.springframework.org/schema/integration/webflux/spring-integration-webflux.xsd">
https://www.springframework.org/schema/integration/webflux/spring-integration-webflux.xsd">
...
</beans>
----

View File

@@ -33,7 +33,7 @@ compile "org.springframework.integration:spring-integration-ws:{project-version}
[[webservices-outbound]]
=== Outbound Web Service Gateways
To invoke a web service when you send a message to a channel, you have two options, both of which build upon the http://projects.spring.io/spring-ws/[Spring Web Services] project: `SimpleWebServiceOutboundGateway` and `MarshallingWebServiceOutboundGateway`.
To invoke a web service when you send a message to a channel, you have two options, both of which build upon the https://projects.spring.io/spring-ws/[Spring Web Services] project: `SimpleWebServiceOutboundGateway` and `MarshallingWebServiceOutboundGateway`.
The former accepts either a `String` or `javax.xml.transform.Source` as the message payload.
The latter supports any implementation of the `Marshaller` and `Unmarshaller` interfaces.
Both require a Spring Web Services `DestinationProvider`, to determine the URI of the web service to be called.
@@ -51,11 +51,11 @@ The following example shows both options for invoking a web service:
NOTE: When using the namespace support (<<webservices-namespace,described later>>), you need only set a URI.
Internally, the parser configures a fixed URI `DestinationProvider` implementation.
If you need dynamic resolution of the URI at runtime, however, then the `DestinationProvider` can provide such behavior as looking up the URI from a registry.
See the Spring Web Services http://docs.spring.io/spring-ws/docs/current/api/org/springframework/ws/client/support/destination/DestinationProvider.html[`DestinationProvider`] Javadoc for more information about this strategy.
See the Spring Web Services https://docs.spring.io/spring-ws/docs/current/api/org/springframework/ws/client/support/destination/DestinationProvider.html[`DestinationProvider`] Javadoc for more information about this strategy.
Starting with version 5.0, you can supply the `SimpleWebServiceOutboundGateway` and `MarshallingWebServiceOutboundGateway` with an external `WebServiceTemplate` instance, which you can configure for any custom properties, including `checkConnectionForFault` (which allows your application to deal with non-conforming services).
For more detail on the inner workings, see the Spring Web Services reference guide's chapter covering http://docs.spring.io/spring-ws/docs/current/reference/html/client.html[client access] and the chapter covering http://docs.spring.io/spring/docs/current/spring-framework-reference/html/oxm.html[Object/XML mapping].
For more detail on the inner workings, see the Spring Web Services reference guide's chapter covering https://docs.spring.io/spring-ws/docs/current/reference/#client[client access] and the chapter covering https://docs.spring.io/spring/docs/current/spring-framework-reference/data-access.html#oxm[Object/XML mapping].
[[webservices-inbound]]
=== Inbound Web Service Gateways
@@ -80,8 +80,8 @@ The following example shows both options:
Both gateways implement the Spring Web Services `MessageEndpoint` interface, so they can be configured with a `MessageDispatcherServlet` as per standard Spring Web Services configuration.
For more detail on how to use these components, see the Spring Web Services reference guide's chapter covering http://docs.spring.io/spring-ws/docs/current/reference/html/server.html[creating a web service].
The chapter covering http://docs.spring.io/spring/docs/current/spring-framework-reference/html/oxm.html[Object/XML mapping] is also applicable again.
For more detail on how to use these components, see the Spring Web Services reference guide's chapter covering https://docs.spring.io/spring-ws/docs/current/reference/#server[creating a web service].
The chapter covering https://docs.spring.io/spring/docs/current/spring-framework-reference/data-access.html#oxm[Object/XML mapping] is also applicable again.
To add the `SimpleWebServiceInboundGateway` and `MarshallingWebServiceInboundGateway` configurations to the Spring WS infrastructure, you should add the `EndpointMapping` definition between `MessageDispatcherServlet` and the target `MessageEndpoint` implementations, as you would for a normal Spring WS application.
For this purpose (from the Spring Integration perspective), Spring WS provides the following convenient `EndpointMapping` implementations:
@@ -93,7 +93,7 @@ For this purpose (from the Spring Integration perspective), Spring WS provides t
You must specify the beans for these classes in the application context and reference the `SimpleWebServiceInboundGateway` and/or `MarshallingWebServiceInboundGateway` bean definitions according to the WS mapping algorithm.
See the http://docs.spring.io/spring-ws/docs/current/reference/html/server.html#server-endpoint-mapping[endpoint mappings] for more information.
See the https://docs.spring.io/spring-ws/docs/current/reference/#server-endpoint-mapping[endpoint mappings] for more information.
[[webservices-namespace]]
=== Web Service Namespace Support
@@ -105,7 +105,7 @@ To configure an outbound web service gateway, use the `outbound-gateway` element
----
<int-ws:outbound-gateway id="simpleGateway"
request-channel="inputChannel"
uri="http://example.org"/>
uri="https://example.org"/>
----
====
@@ -137,7 +137,7 @@ The following example shows how to provide a bean reference for an outbound mars
----
<int-ws:outbound-gateway id="marshallingGateway"
request-channel="requestChannel"
uri="http://example.org"
uri="https://example.org"
marshaller="someMarshaller"
unmarshaller="someUnmarshaller"/>
----
@@ -172,13 +172,13 @@ Starting with version 5.0, the `web-service-template` reference attribute lets y
[[outbound-uri]]
=== Outbound URI Configuration
For all URI schemes supported by Spring Web Services (see http://docs.spring.io/spring-ws/docs/current/reference/html/client.html#client-transports[URIs and Transports]) `<uri-variable/>` substitution is provided.
For all URI schemes supported by Spring Web Services (see https://docs.spring.io/spring-ws/docs/current/reference/#client-transports[URIs and Transports]) `<uri-variable/>` substitution is provided.
The following example shows how to define it:
[source,xml]
----
<ws:outbound-gateway id="gateway" request-channel="input"
uri="http://springsource.org/{thing1}-{thing2}">
uri="https://springsource.org/{thing1}-{thing2}">
<ws:uri-variable name="thing1" expression="payload.substring(1,7)"/>
<ws:uri-variable name="thing2" expression="headers.x"/>
</ws:outbound-gateway>
@@ -196,7 +196,7 @@ If you supply a `DestinationProvider`, variable substitution is not supported an
==== Controlling URI Encoding
By default, the URL string is encoded (see http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/web/util/UriComponentsBuilder.html[`UriComponentsBuilder`]) to the URI object before sending the request.
By default, the URL string is encoded (see https://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/web/util/UriComponentsBuilder.html[`UriComponentsBuilder`]) to the URI object before sending the request.
In some scenarios with a non-standard URI, it is undesirable to perform the encoding.
Since version 4.1, the `<ws:outbound-gateway/>` element provides an `encode-uri` attribute.
To disable encoding the URL, set this attribute `false` (it defaults to `true`).
@@ -205,7 +205,7 @@ If you wish to partially encode some of the URL, you can do so by using an `expr
====
[source,xml]
----
<ws:outbound-gateway url="http://somehost/%2f/fooApps?bar={param}" encode-uri="false">
<ws:outbound-gateway url="https://somehost/%2f/fooApps?bar={param}" encode-uri="false">
<http:uri-variable name="param"
expression="T(org.apache.commons.httpclient.util.URIUtil)
.encodeWithinQuery('Hello World!')"/>
@@ -219,7 +219,7 @@ NOTE: If you set `DestinationProvider`, `encode-uri` is ignored.
=== WS Message Headers
The Spring Integration web service gateways automatically map the SOAP action header.
By default, it is copied to and from Spring Integration `MessageHeaders` by using the http://docs.spring.io/spring-integration/api/org/springframework/integration/ws/DefaultSoapHeaderMapper.html[`DefaultSoapHeaderMapper`].
By default, it is copied to and from Spring Integration `MessageHeaders` by using the https://docs.spring.io/spring-integration/api/org/springframework/integration/ws/DefaultSoapHeaderMapper.html[`DefaultSoapHeaderMapper`].
You can pass in your own implementation of SOAP-specific header mappers, as the gateways have properties to support doing so.

View File

@@ -56,11 +56,11 @@ The following example shows a typical setup:
xmlns:int="http://www.springframework.org/schema/integration"
xmlns:int-xml="http://www.springframework.org/schema/integration/xml"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
https://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/integration
http://www.springframework.org/schema/integration/spring-integration.xsd
https://www.springframework.org/schema/integration/spring-integration.xsd
http://www.springframework.org/schema/integration/xml
http://www.springframework.org/schema/integration/xml/spring-integration-xml.xsd">
https://www.springframework.org/schema/integration/xml/spring-integration-xml.xsd">
</beans>
----
====
@@ -74,9 +74,9 @@ Each of those components either references an XPath Expression that has been def
All forms of XPath expressions result in the creation of an `XPathExpression` that uses the Spring `org.springframework.xml.xpath.XPathExpressionFactory`.
When XPath expressions are created, the best XPath implementation that is available on the classpath is used (either JAXP 1.3+ or Jaxen, with JAXP being preferred).
NOTE: Internally, Spring Integration uses the XPath functionality provided by the Spring Web Services project (http://www.spring.io/spring-ws).
NOTE: Internally, Spring Integration uses the XPath functionality provided by the Spring Web Services project (https://www.spring.io/spring-ws).
Specifically, we use the Spring Web Services XML module (spring-xml-x.x.x.jar).
For a deeper understanding, see the respective documentation at http://docs.spring.io/spring-ws/docs/current/reference/html/common.html#xpath.
For a deeper understanding, see the respective documentation at https://docs.spring.io/spring-ws/docs/current/reference/#xpath.
Here is an overview of all available configuration parameters of the `xpath-expression` element:
The following listing shows the available attributes for the `xpath-expression` element:
@@ -237,7 +237,7 @@ The following XPath Expression matches against the XML document in the preceding
[source,xml]
----
<int-xml:xpath-expression expression="/:order/:orderItem"
ns-prefix="" ns-uri="http://www.example.org/prodcuts"/>
ns-prefix="" ns-uri="https://www.example.org/prodcuts"/>
----
====
@@ -248,12 +248,12 @@ The following XPath expression (which use the `myorder` namespace prefix) also m
[source,xml]
----
<int-xml:xpath-expression expression="/myorder:order/myorder:orderItem"
ns-prefix="myorder" ns-uri="http://www.example.org/prodcuts"/>
ns-prefix="myorder" ns-uri="https://www.example.org/prodcuts"/>
----
====
The namespace URI is the really important piece of information, not the prefix.
The http://jaxen.codehaus.org/faq.html[Jaxen FAQ] summarizes the point very well:
Thehttps://github.com/jaxen-xpath/jaxen[Jaxen] summarizes the point very well:
[quote]
In XPath 1.0, all unprefixed names are unqualified.
@@ -274,22 +274,22 @@ This section will explain the workings of the following transformers and how to
* link:#xml-marshalling-transformer[MarshallingTransformer]
* link:#xml-xslt-payload-transformers[XsltPayloadTransformer]
All of the XML transformers extend either http://docs.spring.io/spring-integration/api/org/springframework/integration/transformer/AbstractTransformer.html[`AbstractTransformer`] or http://docs.spring.io/spring-integration/api/org/springframework/integration/transformer/AbstractPayloadTransformer.html[`AbstractPayloadTransformer`] and therefore implement http://docs.spring.io/spring-integration/api/org/springframework/integration/transformer/Transformer.html[`Transformer`].
When configuring XML transformers as beans in Spring Integration, you would normally configure the `Transformer` in conjunction with a http://docs.spring.io/spring-integration/api/org/springframework/integration/transformer/MessageTransformingHandler.html[`MessageTransformingHandler`].
All of the XML transformers extend either https://docs.spring.io/spring-integration/api/org/springframework/integration/transformer/AbstractTransformer.html[`AbstractTransformer`] or https://docs.spring.io/spring-integration/api/org/springframework/integration/transformer/AbstractPayloadTransformer.html[`AbstractPayloadTransformer`] and therefore implement https://docs.spring.io/spring-integration/api/org/springframework/integration/transformer/Transformer.html[`Transformer`].
When configuring XML transformers as beans in Spring Integration, you would normally configure the `Transformer` in conjunction with a https://docs.spring.io/spring-integration/api/org/springframework/integration/transformer/MessageTransformingHandler.html[`MessageTransformingHandler`].
This lets the transformer be used as an endpoint.
Finally, we discuss the namespace support , which allows for configuring the transformers as elements in XML.
[[xml-unmarshalling-transformer]]
===== UnmarshallingTransformer
An http://docs.spring.io/spring-integration/api/org/springframework/integration/xml/transformer/UnmarshallingTransformer.html[`UnmarshallingTransformer`] lets an XML `Source` be unmarshalled by using implementations of the http://docs.spring.io/spring/docs/current/spring-framework-reference/html/oxm.html[Spring OXM] `Unmarshaller`.
Spring's Object/XML Mapping support provides several implementations that support marshalling and unmarshalling by using http://en.wikipedia.org/wiki/Java_Architecture_for_XML_Binding[JAXB], http://www.castor.org/[Castor], http://jibx.sourceforge.net/[JiBX], and others.
An https://docs.spring.io/spring-integration/api/org/springframework/integration/xml/transformer/UnmarshallingTransformer.html[`UnmarshallingTransformer`] lets an XML `Source` be unmarshalled by using implementations of the https://docs.spring.io/spring/docs/current/spring-framework-reference/html/oxm.html[Spring OXM] `Unmarshaller`.
Spring's Object/XML Mapping support provides several implementations that support marshalling and unmarshalling by using https://en.wikipedia.org/wiki/Java_Architecture_for_XML_Binding[JAXB], https://castor-data-binding.github.io/castor/reference-guide/reference/xml/xml-framework.html[Castor], https://en.wikipedia.org/wiki/JiBX[JiBX], and others.
The unmarshaller requires an instance of `Source`.
If the message payload is not an instance of `Source`, conversion is still attempted.
Currently, `String`, `File`, `byte[]` and `org.w3c.dom.Document` payloads are supported.
To create a custom conversion to a `Source`, you can inject an implementation of a http://docs.spring.io/spring-integration/api/org/springframework/integration/xml/source/SourceFactory.html[`SourceFactory`].
To create a custom conversion to a `Source`, you can inject an implementation of a https://docs.spring.io/spring-integration/api/org/springframework/integration/xml/source/SourceFactory.html[`SourceFactory`].
NOTE: If you do not explicitly set a `SourceFactory`, the property on the `UnmarshallingTransformer` is, by default, set to a http://docs.spring.io/spring-integration/api/org/springframework/integration/xml/source/DomSourceFactory.html[`DomSourceFactory`].
NOTE: If you do not explicitly set a `SourceFactory`, the property on the `UnmarshallingTransformer` is, by default, set to a https://docs.spring.io/spring-integration/api/org/springframework/integration/xml/source/DomSourceFactory.html[`DomSourceFactory`].
Starting with version 5.0, the `UnmarshallingTransformer` also supports an `org.springframework.ws.mime.MimeMessage` as the incoming payload.
This can be useful when we receive a raw `WebServiceMessage` with MTOM attachments over SOAP .
@@ -313,7 +313,7 @@ The following example shows how to define an unmarshalling transformer:
[[xml-marshalling-transformer]]
===== Using `MarshallingTransformer`
The http://docs.spring.io/spring-integration/api/org/springframework/integration/xml/transformer/MarshallingTransformer.html[`MarshallingTransformer`] lets an object graph be converted into XML by using a Spring OXM `Marshaller`.
The https://docs.spring.io/spring-integration/api/org/springframework/integration/xml/transformer/MarshallingTransformer.html[`MarshallingTransformer`] lets an object graph be converted into XML by using a Spring OXM `Marshaller`.
By default, the `MarshallingTransformer` returns a `DomResult`.
However, you can control the type of result by configuring an alternative `ResultFactory`, such as `StringResultFactory`.
In many cases, it is more convenient to transform the payload into an alternative XML format.
@@ -342,20 +342,20 @@ That may be useful for certain custom implementations of the `Marshaller` interf
[[xml-xslt-payload-transformers]]
===== XsltPayloadTransformer
The http://docs.spring.io/spring-integration/api/org/springframework/integration/xml/transformer/XsltPayloadTransformer.html[`XsltPayloadTransformer`] transforms XML payloads by using http://en.wikipedia.org/wiki/XSL_Transformations[Extensible Stylesheet Language Transformations] (XSLT).
The transformer's constructor requires an instance of either http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/core/io/Resource.html[Resource] or http://docs.oracle.com/javase/6/docs/api/javax/xml/transform/Templates.html[Templates] to be passed in.
The https://docs.spring.io/spring-integration/api/org/springframework/integration/xml/transformer/XsltPayloadTransformer.html[`XsltPayloadTransformer`] transforms XML payloads by using https://en.wikipedia.org/wiki/XSL_Transformations[Extensible Stylesheet Language Transformations] (XSLT).
The transformer's constructor requires an instance of either https://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/core/io/Resource.html[Resource] or https://docs.oracle.com/javase/6/docs/api/javax/xml/transform/Templates.html[Templates] to be passed in.
Passing in a `Templates` instance allows for greater configuration of the `TransformerFactory` used to create the template instance.
As with the link:#xml-unmarshalling-transformer[`UnmarshallingTransformer`], the `XsltPayloadTransformer` does the actual XSLT transformation against instances of `Source`.
Therefore, if the message payload is not an instance of `Source`, conversion is still attempted.
`String` and `Document` payloads are supported directly.
To create a custom conversion to a `Source`, you can inject an implementation of a http://docs.spring.io/spring-integration/api/org/springframework/integration/xml/source/SourceFactory.html[`SourceFactory`].
To create a custom conversion to a `Source`, you can inject an implementation of a https://docs.spring.io/spring-integration/api/org/springframework/integration/xml/source/SourceFactory.html[`SourceFactory`].
NOTE: If a `SourceFactory` is not set explicitly, the property on the `XsltPayloadTransformer` is, by default, set to a http://docs.spring.io/spring-integration/api/org/springframework/integration/xml/source/DomSourceFactory.html[`DomSourceFactory`].
NOTE: If a `SourceFactory` is not set explicitly, the property on the `XsltPayloadTransformer` is, by default, set to a https://docs.spring.io/spring-integration/api/org/springframework/integration/xml/source/DomSourceFactory.html[`DomSourceFactory`].
By default, the `XsltPayloadTransformer` creates a message with a http://docs.oracle.com/javase/6/docs/api/javax/xml/transform/Result.html[`Result`] payload, similar to the `XmlPayloadMarshallingTransformer`.
You can customize this by providing a http://docs.spring.io/spring-integration/api/org/springframework/integration/xml/result/ResultFactory.html[`ResultFactory`] or a http://docs.spring.io/spring-integration/api/org/springframework/integration/xml/transformer/ResultTransformer.html[`ResultTransformer`].
By default, the `XsltPayloadTransformer` creates a message with a https://docs.oracle.com/javase/6/docs/api/javax/xml/transform/Result.html[`Result`] payload, similar to the `XmlPayloadMarshallingTransformer`.
You can customize this by providing a https://docs.spring.io/spring-integration/api/org/springframework/integration/xml/result/ResultFactory.html[`ResultFactory`] or a https://docs.spring.io/spring-integration/api/org/springframework/integration/xml/transformer/ResultTransformer.html[`ResultTransformer`].
The following example configures a bean that works as an XSLT payload transformer:
@@ -375,20 +375,20 @@ You can do so by using the `transformer-factory-class` attribute when you use th
[[xml-using-result-transformers]]
===== Using `ResultTransformer` Implementations
Both the `MarshallingTransformer` and the `XsltPayloadTransformer` let you specify a http://docs.spring.io/spring-integration/api/org/springframework/integration/xml/transformer/ResultTransformer.html[`ResultTransformer`].
Thus, if the marshalling or XSLT transformation returns a http://docs.oracle.com/javase/6/docs/api/javax/xml/transform/Result.html[`Result`], you have the option to also use a `ResultTransformer` to transform the `Result` into another format.
Both the `MarshallingTransformer` and the `XsltPayloadTransformer` let you specify a https://docs.spring.io/spring-integration/api/org/springframework/integration/xml/transformer/ResultTransformer.html[`ResultTransformer`].
Thus, if the marshalling or XSLT transformation returns a https://docs.oracle.com/javase/6/docs/api/javax/xml/transform/Result.html[`Result`], you have the option to also use a `ResultTransformer` to transform the `Result` into another format.
Spring Integration provides two concrete `ResultTransformer` implementations:
* http://docs.spring.io/spring-integration/api/org/springframework/integration/xml/transformer/ResultToDocumentTransformer.html[`ResultToDocumentTransformer`]
* http://docs.spring.io/spring-integration/api/org/springframework/integration/xml/transformer/ResultToStringTransformer.html[`ResultToStringTransformer`]
* https://docs.spring.io/spring-integration/api/org/springframework/integration/xml/transformer/ResultToDocumentTransformer.html[`ResultToDocumentTransformer`]
* https://docs.spring.io/spring-integration/api/org/springframework/integration/xml/transformer/ResultToStringTransformer.html[`ResultToStringTransformer`]
By default, the `MarshallingTransformer` always returns a http://docs.oracle.com/javase/6/docs/api/javax/xml/transform/Result.html[`Result`].
By default, the `MarshallingTransformer` always returns a https://docs.oracle.com/javase/6/docs/api/javax/xml/transform/Result.html[`Result`].
By specifying a `ResultTransformer`, you can customize the type of payload returned.
The behavior is slightly more complex for the `XsltPayloadTransformer`.
By default, if the input payload is an instance of `String` or http://docs.oracle.com/javase/6/docs/api/org/w3c/dom/Document.html[`Document`] the `resultTransformer` property is ignored.
By default, if the input payload is an instance of `String` or https://docs.oracle.com/javase/6/docs/api/org/w3c/dom/Document.html[`Document`] the `resultTransformer` property is ignored.
However, if the input payload is a http://docs.oracle.com/javase/6/docs/api/javax/xml/transform/Source.html[`Source`] or any other type, the `resultTransformer` property is applied.
However, if the input payload is a https://docs.oracle.com/javase/6/docs/api/javax/xml/transform/Source.html[`Source`] or any other type, the `resultTransformer` property is applied.
Additionally, you can set the `alwaysUseResultFactory` property to `true`, which also causes the specified `resultTransformer` to be used.
For more information and examples, see <<xml-using-result-transformers-namespace>>.
@@ -450,15 +450,15 @@ The following example configures a marshalling transformer:
Where the provided result types do not suffice, you can provide a reference to a custom implementation of `ResultFactory` as an alternative to setting the `result-type` attribute by using the `result-factory` attribute.
The `result-type` and `result-factory` attributes are mutually exclusive.
NOTE: Internally, the `StringResult` and `DomResult` result types are represented by the `ResultFactory` implementations: http://docs.spring.io/spring-integration/api/org/springframework/integration/xml/result/StringResultFactory.html[`StringResultFactory`] and http://docs.spring.io/spring-integration/api/org/springframework/integration/xml/result/DomResultFactory.html[`DomResultFactory`] respectively.
NOTE: Internally, the `StringResult` and `DomResult` result types are represented by the `ResultFactory` implementations: https://docs.spring.io/spring-integration/api/org/springframework/integration/xml/result/StringResultFactory.html[`StringResultFactory`] and https://docs.spring.io/spring-integration/api/org/springframework/integration/xml/result/DomResultFactory.html[`DomResultFactory`] respectively.
===== Using an `XsltPayloadTransformer`
Namespace support for the `XsltPayloadTransformer` lets you either pass in a `Resource` (in order to create the http://docs.oracle.com/javase/6/docs/api/javax/xml/transform/Templates.html[`Templates`] instance) or pass in a pre-created `Templates` instance as a reference.
Namespace support for the `XsltPayloadTransformer` lets you either pass in a `Resource` (in order to create the https://docs.oracle.com/javase/6/docs/api/javax/xml/transform/Templates.html[`Templates`] instance) or pass in a pre-created `Templates` instance as a reference.
As with the marshalling transformer, you can control the type of the result output by specifying either the `result-factory` or the `result-type` attribute.
When you need to convert result before sending, you can use a `result-transformer` attribute to reference an implementation of `ResultTransformer`.
IMPORTANT: If you specify the `result-factory` or the `result-type` attribute, the `alwaysUseResultFactory` property on the underlying http://docs.spring.io/spring-integration/api/org/springframework/integration/xml/transformer/XsltPayloadTransformer.html[`XsltPayloadTransformer`] is set to `true` by the http://docs.spring.io/spring-integration/api/org/springframework/integration/xml/config/XsltPayloadTransformerParser.html[`XsltPayloadTransformerParser`].
IMPORTANT: If you specify the `result-factory` or the `result-type` attribute, the `alwaysUseResultFactory` property on the underlying https://docs.spring.io/spring-integration/api/org/springframework/integration/xml/transformer/XsltPayloadTransformer.html[`XsltPayloadTransformer`] is set to `true` by the https://docs.spring.io/spring-integration/api/org/springframework/integration/xml/config/XsltPayloadTransformerParser.html[`XsltPayloadTransformerParser`].
The following example configures two XSLT transformers:
@@ -542,8 +542,8 @@ IMPORTANT: The specified `ResultTransformer` is ignored with `String` or `Docume
If the incoming message's payload is of type `String`, the payload after the XSLT transformation is a `String`.
Similarly, if the incoming message's payload is of type `Document`, the payload after the XSLT transformation is a`Document`.
If the message payload is not a `Source`, a `String`, or a `Document`, as a fallback option, we try to create a`Source` by using the default http://docs.spring.io/spring-integration/api/org/springframework/integration/xml/source/SourceFactory.html[`SourceFactory`].
As we did not specify a `SourceFactory` explicitly by using the `source-factory` attribute, the default http://docs.spring.io/spring-integration/api/org/springframework/integration/xml/source/DomSourceFactory.html[`DomSourceFactory`] is used.
If the message payload is not a `Source`, a `String`, or a `Document`, as a fallback option, we try to create a`Source` by using the default https://docs.spring.io/spring-integration/api/org/springframework/integration/xml/source/SourceFactory.html[`SourceFactory`].
As we did not specify a `SourceFactory` explicitly by using the `source-factory` attribute, the default https://docs.spring.io/spring-integration/api/org/springframework/integration/xml/source/DomSourceFactory.html[`DomSourceFactory`] is used.
If successful, the XSLT transformation is executed as if the payload was of type `Source`, as described in the previous paragraphs.
NOTE: The `DomSourceFactory` supports the creation of a `DOMSource` from a `Document`, a `File`, or a `String` payload.
@@ -565,13 +565,13 @@ The following example shows that transformer declaration:
Because we use a `ResultFactory`, the `alwaysUseResultFactory` property of the `XsltPayloadTransformer` class is implicitly set to `true`.
Consequently, the referenced `ResultToDocumentTransformer` is used.
Therefore, if you transform a payload of type `String`, the resulting payload is of type http://docs.oracle.com/javase/6/docs/api/org/w3c/dom/Document.html[`Document`].
Therefore, if you transform a payload of type `String`, the resulting payload is of type https://docs.oracle.com/javase/6/docs/api/org/w3c/dom/Document.html[`Document`].
===== `XsltPayloadTransformer` and `<xsl:output method="text"/>`
`<xsl:output method="text"/>` tells the XSLT template to produce only text content from the input source.
In this particular case, we have no reason to use a `DomResult`.
Therefore, the http://docs.spring.io/spring-integration/api/org/springframework/integration/xml/transformer/XsltPayloadTransformer.html[`XsltPayloadTransformer`] defaults to `StringResult` if the http://docs.oracle.com/javase/7/docs/api/javax/xml/transform/Transformer.html#getOutputProperties()[output property] called `method` of the underlying `javax.xml.transform.Transformer` returns `text`.
Therefore, the https://docs.spring.io/spring-integration/api/org/springframework/integration/xml/transformer/XsltPayloadTransformer.html[`XsltPayloadTransformer`] defaults to `StringResult` if the https://docs.oracle.com/javase/7/docs/api/javax/xml/transform/Transformer.html#getOutputProperties()[output property] called `method` of the underlying `javax.xml.transform.Transformer` returns `text`.
This coercion is performed independently from the inbound payload type.
This behavior is available only you set the if the `result-type` attribute or the `result-factory` attribute for the `<int-xml:xslt-transformer>` component.
@@ -852,8 +852,8 @@ This means that, if the expression selects multiple nodes, it return the string
For further information, see:
* http://www.w3.org/TR/xpath/[Specification: XML Path Language (XPath) Version 1.0]
* http://www.w3.org/TR/xpath/#function-string[XPath specification - string() function]
* https://www.w3.org/TR/xpath/[Specification: XML Path Language (XPath) Version 1.0]
* https://www.w3.org/TR/xpath-functions-31[XPath specification - string() function]
=====
For example, if we want to route based on the name of the root node, we can use the following configuration:
@@ -1049,8 +1049,8 @@ For more information, see "`<<spel>>.
The XML Validating Filter lets you validate incoming messages against provided schema instances.
The following schema types are supported:
* xml-schema (http://www.w3.org/2001/XMLSchema)
* relax-ng (http://relaxng.org/ns/structure/1.0)
* xml-schema (https://www.w3.org/2001/XMLSchema)
* relax-ng (https://relaxng.org)
Messages that fail validation can either be silently dropped or be forwarded to a definable `discard-channel`.
Furthermore, you can configure this filter to throw an `Exception` in case validation fails.

View File

@@ -1,7 +1,7 @@
[[xmpp]]
== XMPP Support
Spring Integration provides channel adapters for http://www.xmpp.org[XMPP].
Spring Integration provides channel adapters for https://www.xmpp.org[XMPP].
XMPP stands for "`Extensible Messaging and Presence Protocol`".
XMPP describes a way for multiple agents to communicate with each other in a distributed system.
@@ -11,7 +11,7 @@ Within that network, actors may address each other directly and broadcast status
XMPP provides the messaging fabric that underlies some of the biggest instant messaging networks in the world, including Google Talk (GTalk, which is also available from within GMail) and Facebook Chat.
Many good open-source XMPP servers are available.
Two popular implementations are http://www.igniterealtime.org/projects/openfire/[Openfire] and http://www.ejabberd.im[ejabberd].
Two popular implementations are https://www.igniterealtime.org/projects/openfire/[Openfire] and https://www.ejabberd.im[ejabberd].
Spring integration provides support for XMPP by providing XMPP adapters, which support sending and receiving both XMPP chat messages and presence changes from other entries in a client's roster.
@@ -43,7 +43,7 @@ To configure the XMPP namespace, include the following elements in the headers o
----
xmlns:int-xmpp="http://www.springframework.org/schema/integration/xmpp"
xsi:schemaLocation="http://www.springframework.org/schema/integration/xmpp
http://www.springframework.org/schema/integration/xmpp/spring-integration-xmpp.xsd"
https://www.springframework.org/schema/integration/xmpp/spring-integration-xmpp.xsd"
----
====
@@ -80,7 +80,7 @@ This functionality is not always available for the target XMPP servers.
For example, Google Cloud Messaging (GCM) and Firebase Cloud Messaging (FCM) fully disable it.
To switch off the roster listener for subscriptions, you can configure it with an empty string when using XML configuration (`subscription-mode=""`) or with `XmppConnectionFactoryBean.setSubscriptionMode(null)` when using Java Configuration.
Doing so disables the roster at the login phase as well.
See http://download.igniterealtime.org/smack/docs/latest/javadoc/org/jivesoftware/smack/roster/Roster.html#setRosterLoadedAtLogin-boolean-[`Roster.setRosterLoadedAtLogin(boolean)`] for more information.
See https://download.igniterealtime.org/smack/docs/latest/javadoc/org/jivesoftware/smack/roster/Roster.html#setRosterLoadedAtLogin-boolean-[`Roster.setRosterLoadedAtLogin(boolean)`] for more information.
[[xmpp-messages]]
=== XMPP Messages
@@ -267,7 +267,7 @@ In that case, the bean with named `xmppConnection` is located and injected into
[[xmpp-advanced]]
=== Advanced Configuration
Spring Integration's XMPP support is based on the Smack 4.0 API (http://www.igniterealtime.org/projects/smack/), which allows more complex configuration of the XMPP Connection object.
Spring Integration's XMPP support is based on the Smack 4.0 API (https://www.igniterealtime.org/projects/smack/), which allows more complex configuration of the XMPP Connection object.
As <<xmpp-connection,stated earlier>>, the `xmpp-connection` namespace support is designed to simplify basic connection configuration and supports only a few common configuration attributes.
However, the `org.jivesoftware.smack.ConnectionConfiguration` object defines about 20 attributes, and adding namespace support for all of them offers no real value.
@@ -323,14 +323,14 @@ public class CustomConnectionConfiguration {
----
====
For more information on using Java for application context configuration, see the following section in the http://docs.spring.io/spring/docs/current/spring-framework-reference/html/beans.html#beans-java[Spring Reference Manual].
For more information on using Java for application context configuration, see the following section in the https://docs.spring.io/spring/docs/current/spring-framework-reference/core.html#beans-java[Spring Reference Manual].
[[xmpp-message-headers]]
=== XMPP Message Headers
The Spring Integration XMPP Adapters automatically map standard XMPP properties.
By default, these properties are copied to and from Spring Integration `MessageHeaders` by using
http://docs.spring.io/spring-integration/api/org/springframework/integration/xmpp/support/DefaultXmppHeaderMapper.html[`DefaultXmppHeaderMapper`].
https://docs.spring.io/spring-integration/api/org/springframework/integration/xmpp/support/DefaultXmppHeaderMapper.html[`DefaultXmppHeaderMapper`].
Any user-defined headers are not copied to or from an XMPP Message, unless explicitly specified by the `requestHeaderNames` or `replyHeaderNames` properties of the `DefaultXmppHeaderMapper`.
@@ -373,11 +373,11 @@ However, you may need to do more than the basics.
For example, you might need to include formatting (bold, italic, and so on) in a message, which is not defined in the core XMPP specification.
Well, you can make up a way to do that, but, unless everyone else does it the same way you do, no other software can interpret it (they ignore namespaces they cannot understand).
To solve that problem, the XMPP Standards Foundation (XSF) publishes a series of extra documents, known as http://xmpp.org/extensions/xep-0001.html[XMPP Enhancement Proposals] (XEPs).
To solve that problem, the XMPP Standards Foundation (XSF) publishes a series of extra documents, known as https://xmpp.org/extensions/xep-0001.html[XMPP Enhancement Proposals] (XEPs).
In general, each XEP describes a particular activity (from message formatting to file transfers, multi-user chats, and many more).
They also provide a standard format for everyone to use for that activity.
The Smack API provides many XEP implementations with its `extensions` and `experimental` http://www.igniterealtime.org/builds/smack/docs/latest/documentation/extensions/index.html[projects].
The Smack API provides many XEP implementations with its `extensions` and `experimental` https://www.igniterealtime.org/builds/smack/docs/latest/documentation/extensions/index.html[projects].
Starting with Spring Integration version 4.3, you can use any XEP with the existing XMPP channel adapters.
To be able to process XEPs or any other custom XMPP extensions, you must provide the Smack's `ProviderManager` pre-configuration.
@@ -415,13 +415,13 @@ The `mycustom.providers` file might be as follows:
<iqProvider>
<elementName>query</elementName>
<namespace>http://jabber.org/protocol/disco#items</namespace>
<namespace>https://jabber.org/protocol/disco#items</namespace>
<className>org.jivesoftware.smackx.provider.DiscoverItemsProvider</className>
</iqProvider>
<extensionProvider>
<elementName>subscription</elementName>
<namespace>http://jabber.org/protocol/pubsub</namespace>
<namespace>https://jabber.org/protocol/pubsub</namespace>
<className>org.jivesoftware.smackx.pubsub.provider.SubscriptionProvider</className>
</extensionProvider>
</smackProviders>