Commit Graph

989 Commits

Author SHA1 Message Date
Qimiao Chen 09b36380cd
Fix typos in source files
Closes gh-24746
2020-03-20 20:06:52 +01:00
Rossen Stoyanchev 7efb62091d MessagingRSocket correctly handles unconsumed input
Closes gh-24741
2020-03-20 10:03:56 +00:00
Rossen Stoyanchev 5b27df772a Suppress deprecation warning
See gh-24725
2020-03-19 07:21:21 +00:00
Sam Brannen a8feb792da Fix broken Javadoc links 2020-03-16 16:30:27 +01:00
Rossen Stoyanchev 4aedf2ea13 MetadataEncoder expands vars correctly
Closes gh-24656
2020-03-12 11:35:08 +00:00
ZhangT c5fb7b9fb7
Simplify some redundant code
Closes gh-24586

Co-authored-by: Sam Brannen <sbrannen@pivotal.io>
2020-02-26 12:29:09 +01:00
Hyunjin Choi ede2a1d4b2 Remove unnecessary semicolon in some enum classes 2020-02-24 14:56:12 +01:00
Rossen Stoyanchev 28a95e89f3 Upgrade to Dysprosium SR5 snapshots
See gh-24355
2020-02-11 12:52:04 +00:00
Rossen Stoyanchev 3c0c0c0597 Fix issue with new line handling in StompDecoder
Closes gh-23713
2020-01-16 14:54:10 +00:00
Sam Brannen 94f8ef08e2 Move common TestPrincipal to spring-core test fixtures
See gh-23550
2020-01-02 16:01:35 +01:00
Sam Brannen 4260c34b47 Rename test fixture package in spring-core
See gh-23550
2020-01-02 16:01:34 +01:00
Sam Brannen 5718bf424b Use Gradle test fixture support for spring-core
See gh-23550
2020-01-02 16:01:34 +01:00
Sam Brannen 1b4fd1cba1 Polishing 2019-12-22 16:00:45 +01:00
Sébastien Deleuze 0f41536820 Fix RSocketRequester Coroutines extensions
After gh-24073, some Coroutines extensions should be applied on
RetrieveSpec instead of RequestSpec.

Closes gh-24166
2019-12-09 11:50:06 +01:00
Sam Brannen 55ae3c5e87 Polishing 2019-12-07 12:59:03 +01:00
Brian Clozel d4209392d2 Allow ExchangeStrategies customizations in WebClient
Prior to this commit, developers could configure their WebClient to use
their custom `ExchangeStrategies`, by providing it in the
`WebClient.Builder` chain.
Once created, an `ExchangeStrategies` instance is not mutable, which
makes it hard for further customizations by other components. In the
case of the reported issue, other components would override the default
configuration for the codecs maxInMemorySize.

This commit makes the `ExchangeStrategies` mutable and uses that fact to
further customize them with a new `WebClient.Builder#exchangeStrategies`
`Consumer` variant. This commit is also deprecating those mutating
variants in favor of a new `WebClient.Builder#exchangeStrategies` that
takes a `ExchangeStrategies#Builder` directly and avoids mutation issues
altogether.

Closes gh-23961
2019-12-02 14:12:59 +00:00
Brian Clozel 1560bbd81e Revert "Allow ExchangeStrategies customizations in WebClient"
This reverts commit b3020bc484.
2019-12-02 10:39:53 +01:00
Juergen Hoeller 567c7695dd Polishing 2019-12-01 00:20:00 +01:00
Brian Clozel b3020bc484 Allow ExchangeStrategies customizations in WebClient
Prior to this commit, developers could configure their WebClient to use
their custom `ExchangeStrategies`, by providing it in the
`WebClient.Builder` chain.
Once created, an `ExchangeStrategies` instance is not mutable, which
makes it hard for further customizations by other components. In the
case of the reported issue, other components would override the default
configuration for the codecs maxInMemorySize.

This commit makes the `ExchangeStrategies` mutable and uses that fact to
further customize them with a new `WebClient.Builder#exchangeStrategies`
`Consumer` variant. This commit is also deprecating those mutating
variants in favor of a new `WebClient.Builder#exchangeStrategies` that
takes a `ExchangeStrategies#Builder` directly and avoids mutation issues
altogether.

Closes gh-23961
2019-11-29 22:26:52 +01:00
Rossen Stoyanchev 25f3465f1f Polishing contribution
See gh-24087
2019-11-29 15:53:37 +00:00
Parviz ROzikov e858b21c60 #24022 - added protobuf MessageConverter 2019-11-29 14:20:05 +00:00
Rossen Stoyanchev 26d800cc93 Fix empty payload handling in RSocketRequester
Closes gh-24088
2019-11-27 07:35:45 +00:00
Rossen Stoyanchev 30d68f2de7 Reject user names with "%2F" in STOMP
Closes gh-23836
2019-11-26 16:21:48 +00:00
Rossen Stoyanchev 6ed1b5835b Separate step for retrieve in RSocketRequester
Closes gh-24073
2019-11-25 11:47:41 +00:00
Sébastien Deleuze 712eac2915 Refine Coroutines annotated controller support
This commit refines Coroutines annotated controller support
by considering Kotlin Unit as Java void and using the right
ReactiveAdapter to support all use cases, including suspending
functions that return Flow (usual when using APIs like WebClient).

It also fixes RSocket fire and forget handling and adds related tests
for that use case.

Closes gh-24057
Closes gh-23866
2019-11-22 14:13:17 +01:00
Rossen Stoyanchev 996f7290cf Allow async metadata in RSocketRequester
This commit allows single-value async producers for the values of
metadata entries in both the SETUP and for requests. The same is also
enabled for data in the SETUP frame.

Close gh-23640
2019-11-20 19:41:16 +00:00
Rossen Stoyanchev f08cf0e864 Add RSocketFrameTypeMessageCondition constants
See gh-23999
2019-11-19 16:03:56 +00:00
Rossen Stoyanchev 842b424acd Use method signature to refine RSocket @MessageMapping
Before this change an @MessageMapping could be matched to any RSocket
interaction type, which is arguably too flexible, makes it difficult to
reason what would happen in case of a significant mismatch of
cardinality, e.g. request for Fire-And-Forget (1-to-0) mapped to a
method that returns Flux, and could result in payloads being ignored,
or not seen unintentionally.

This commit checks @ConnectMapping method on startup and rejects them
if they return any values (sync or async). It also refines each
@MessageMapping to match only the RSocket interaction type it fits
based on the input and output cardinality of the handler method.
Subsequently if a request is not matched, we'll do a second search to
identify partial matches (by route only) and raise a helpful error that
explains which interaction type is actually supported.

The reference docs has been updated to explain the options.

Closes gh-23999
2019-11-18 17:27:41 +00:00
Rossen Stoyanchev 32f82c0ed0 Polishing 2019-11-08 17:47:59 +00:00
Ilja 08f1cb454a Allow sending headers with the disconnect frame 2019-11-08 17:41:39 +00:00
Rossen Stoyanchev b2b02ad7a1 Polishing 2019-11-08 15:03:53 +00:00
Ilya Lukyanovich 801cca8cf8 Preserve ErrorMessage#getOriginalMessage()
See gh-23417
2019-11-08 15:03:53 +00:00
Rossen Stoyanchev 0e1a237139 Polishing 2019-11-08 09:17:25 +00:00
Johnny Lim 91f5f42d13 Add tests for PrincipalMethodArgumentResolver 2019-11-08 08:48:56 +00:00
Rossen Stoyanchev 005d2018d4 Refine changes for PR
Closes gh-23882
2019-10-31 14:14:44 +00:00
Dekel Pilli 64f2beb9bf Fixing NPE in AbstractNamedValueMethodArgumentResolver
See gh-23882
2019-10-31 14:13:44 +00:00
Sam Brannen 9f00eb68e9 Clean up warnings 2019-10-30 19:14:58 +01:00
Christoph Dreis 3c17178b16 Fix Mockito deprecations 2019-10-30 18:30:05 +01:00
Juergen Hoeller 19ff7d84ab Polishing 2019-10-30 14:31:46 +01:00
Sebastien Deleuze 9f242fac66 Add RSocketRequester retrieveAndAwaitOrNull extension
Closes gh-23874
2019-10-27 20:11:08 +01:00
Rossen Stoyanchev 739d2881fa Polishing 2019-10-23 14:55:55 +01:00
KateVasovski f77d23de94 @MessgeMapping support for Optional<Principal> 2019-10-23 14:51:07 +01:00
Juergen Hoeller 2861fc65bd Polishing 2019-09-27 10:17:56 +02:00
Sebastien Deleuze 091c512f0d Upgrade to Coroutines 1.3.2
Closes gh-23663
2019-09-25 21:51:04 +02:00
Sebastien Deleuze c10dcec9ed Polishing 2019-09-25 21:48:47 +02:00
Sebastien Deleuze a4b278a269 Polishing 2019-09-25 17:02:05 +02:00
Sebastien Deleuze 5866693ece Add MetadataExtractorRegistry.metadataToExtract Kotlin extensions
Closes gh-23705
2019-09-25 17:02:05 +02:00
Rossen Stoyanchev e2baf7277b Use metadata slice
Take a slice of the metadata if not using composite metadata to allow
reading it multiple times. For composite metadata this is not an isuse
as it is ensured by the underlying RSocket Java API.
2019-09-23 13:32:28 +01:00
Brian Clozel 809009e6c4 Rename RSocketStrategies.Builder.metadataExtractors
This commit renames the `metadataExtractors` method to something that is
closer to the actual intent: addming new metadata extractors against the
registry given as a parameter of the `Consumer`.

The method is renamed to `metadataExtractorRegistry`.
2019-09-19 14:54:36 +02:00
Sebastien Deleuze 90b5e6ab48 Polishing
See gh-23649
2019-09-18 19:29:15 +02:00