Fixes https://github.com/spring-projects/spring-integration/issues/2974
There is a race in that we could get a `SocketException` in `inputStream`.
Since this is between payloads, it needs to be thrown as a
`SoftEndOfStreamException`.
* * Add javadocs to SoftEndOfStreamException
* * SEOSE is now a RuntimeException (can't be an UncheckedIOException - no default CTOR
* Add validation support into WebFlux Inbound
See https://stackoverflow.com/questions/56729517/spring-integration-webflux-validate-input-json-body
* Introduce a `WebFluxInboundEndpoint.validator` option to validate
a request payload after conversion HTTP request into a `Publisher`
* Expose a `WebFluxInboundEndpointSpec.validator()` option
* Introduce a `IntegrationWebExchangeBindException` to extend a
`WebExchangeBindException` for Spring Integration use-case.
such an exception is used in the `ResponseStatusExceptionHandler`
extensions, like one in Spring Boot for proper response rendering
* Test and document the solution
* * Remove unused imports from IntegrationWebExchangeBindException
* Fix `SmartLifecycle.stop(Runnable)` usage
We always have to call `callback` in the `SmartLifecycle.stop(Runnable)`
implementation independently of component state
* Fix `StandardIntegrationFlow.stop(Runnable)` for a logic when we
don't have any `this.lifecycles`
* Remove those `stop(Runnable)` which are fully equivalent of the
`default` on in the `SmartLifecycle`
* Some other simple polishing for the affected classes, e.g.
`isSingleton()` is `default` with `true` in the `InitializingBean`
**Cherry-pick to 5.1.x**
* * Fix checkstyle violation
It turns out that `contentType` header (as well as `Accept`) may be
converted into `MimeType` upstream before the message is sent into HTTP
Outbound Channel Adapter meanwhile the logic is only to support String
and MediaType
* Change the `DefaultHttpHeaderMapper` to support more generic `MimeType`
for the `Content-Type` and `Accept` HTTP headers which can simply be
converted to the expected `MediaType`
**Cherry-pick to 5.1.x & 5.0.x**
* GH-2967: Fix ScatterGatherH for headers copy
Fixes https://github.com/spring-projects/spring-integration/issues/2967
The `ChannelInterceptor` is added into the `this.gatherChannel` on each
request message making a subsequent requests for scatter-gather as
halting on reply.
* Add an interceptor into an injected `this.gatherChannel` only once
during `ScatterGatherHandler` initialization
* Introduce `ORIGINAL_REPLY_CHANNEL` and `ORIGINAL_ERROR_CHANNEL`
headers to carry a request reply and error channels from headers
* Populate `REPLY_CHANNEL` and `ERROR_CHANNEL` headers back before
sending scattering replies into gatherer
* Transfer a `GATHER_RESULT_CHANNEL` header now directly from the scatter
message to make it available in the reply from the gatherer
* Add note about those headers in the `scatter-gather.adoc`
* Modify `ScatterGatherTests` to be sure that `ScatterGatherHandler`
works for several requests
**Cherry-pick to 5.1.x**
* * Fix language in doc
Looks like we can't have a custom `whitelist.lines` in the `/checkstyle`
dir.
* Move `whitelist.lines` with the `http://www.jcraft.com` entry into the
`/src/nohttp`
* Upgrade `nohttp` to `0.0.3`
* Revert `jsch` URL in the `sftp.adoc`
* Upgrade to Micormeter-1.1.5
JIRA: https://jira.spring.io/browse/INT-3073
Add `FluxAggregatorMessageHandlerTests`
* Add `FluxAggregatorMessageHandlerTests`
* Fix `FluxAggregatorMessageHandler` for the default `messageForWindowFlux`
to rely on the `publish().autoConnect()` to build a target `Flux` for
window and also copy headers from the first `Message` in the window.
Looks like `switchOnFirst()` doesn't work somehow with windows or I just
don't use it properly, although it isn't clear how to continue chain but
get the whole `Flux` as a single entry for message payload
* Add more tests for `FluxAggregatorMessageHandlerTests`
* Fix `AbstractMessageSplitter` to cast properly a primitive array
* Implement `Lifecycle` in the `FluxAggregatorMessageHandler`
* Add JavaDocs into the `FluxAggregatorMessageHandler`
Javadoc polishing
Resolves https://github.com/spring-projects/spring-integration/issues/2958
The previous commit added the raw source message to a common header
`IntegrationMessageHeaderAccessor.SOURCE_DATA` so that the spring-cloud-stream
can construct an error message containing the data when using functions.
However, we also need to add it to the common header when the `ErrorMessage`
is created by Spring Integration for the normal message channel binder.
This allows the DLQ processing to be agnostic as to who created the
error message.
Looks like latest upgrades for the CI server made virtual machines a bit
slower (less resources are allocated), so we don't have a reasonable
time for switching between threads.
* Move the plugin and its task into the root project configuration
* Add more image file extensions to exclude
* Fix `sftp.adoc` do not use HTTP url for the JSCH library project page;
use GitHub repo link instead
https://build.spring.io/browse/INT-MASTER-1568/
* Fix `whats-new.adoc` for broken link
* remove `logDocuments = true` from the `build.gradle`
* Change the Gradle task name in the `.travis.yml` for consistency
* Check external links have a description
* Use Groovy regex instead of Java
* Add source file name to exception message
* Add 'checkAsciiDocLinks' to Travis build
* GH-2880: Handle `Pausable` in Control Bus
Fixes https://github.com/spring-projects/spring-integration/issues/2880
* Refactor `ControlBusMethodFilter` to handle `Pausable` managed operations
* Optimize and internal `ControlBusMethodFilter.filter()` logic to rely
on the `MergedAnnotations`
* Modify `EnableIntegrationTests` to test new functionality and document
the feature
* * `ControlBusMethodFilter` to deal with plain `Lifecycle` impls as well
It turns out that `spring-ws-core` brings too much WS stuff which
triggers and auto-configuration to be enabled in Spring Boot app when
we don't expect it.
* The `UnmarshallingTransformer` is already aware of `MimeMessage` and
`MarshallingUtils` being optional, so just remove redundant `public`
modifier for `maybeUnmarshalMimeMessage()` method
* Load `ServletContextResource` class in the `XsltPayloadTransformer`
on demand making such a dependency as optional
* Add `io.spring.nohttp` Gradle plugin into the build script and allow
it only on CI server, since it is going to parse every file
* Fix tests do not use `http` any more
* Fix `test.html` in the `mail` modules tests to exclude a Namespace for
OExchange XRD protocol
* Fix some files for new line in the end of file according Checkstyle
violations