INT-4570: Add MessageCollectionCallback for Mongo (#2675)

* INT-4570: Add MessageCollectionCallback for Mongo

JIRA: https://jira.spring.io/browse/INT-4570

The `MongoDbOutboundGateway` is intended to be used with the
`requestMessage` context, however using a plain `CollectionCallback`
we don't have access to the `requestMessage`

* Deprecate `CollectionCallback` usage in favor of newly introduced
`MessageCollectionCallback` and `message-collection-callback` for XML

**Cherry-pick to 5.0.x**

* * Remove `message-collection-callback` in favor of
`MessageCollectionCallback<T> extends CollectionCallback<T>`

* * Rename a new setter to `setMessageCollectionCallback()` to avoid
reflection collision
This commit is contained in:
Artem Bilan
2018-12-21 15:27:03 -05:00
committed by Gary Russell
parent 0d09bdccd4
commit 1943c15afe
9 changed files with 159 additions and 46 deletions

View File

@@ -244,7 +244,10 @@
<xsd:appinfo>
<xsd:documentation>
Reference to an instance of
org.springframework.data.mongodb.core.CollectionCallback
org.springframework.data.mongodb.core.CollectionCallback, preferable an
instance of
org.springframework.integration.mongodb.outbound.MessageCollectionCallback
with the request message context.
</xsd:documentation>
<tool:annotation kind="ref">
<tool:expected-type