Commit Graph

487 Commits

Author SHA1 Message Date
Juergen Hoeller
215514f27b Polishing (backported from master) 2021-03-12 15:29:29 +01:00
Rossen Stoyanchev
3703be5aaf MessageHeaderAccessor handle self-copy correctly
1. Revert changes in setHeader from 5.2.9 that caused regression on self-copy.
2. Update copyHeaders/IfAbsent to ensure a copy of native headers.
3. Exit if source and target are the same instance, as an optimization.

Closes gh-26155
2020-11-26 21:56:17 +00:00
Rossen Stoyanchev
7ad60d385b Fix issue with copying headers in NativeMessageHeaderAccessor
Closes gh-25821
2020-09-30 21:42:26 +01:00
Rossen Stoyanchev
4b9c3fa739 Polishing Javadoc
See gh-25821
2020-09-30 21:42:26 +01:00
Juergen Hoeller
6e4fcb69f0 Polishing 2020-09-25 11:26:01 +02:00
Rossen Stoyanchev
1d0fe1223d Fix checkstyle violation 2020-06-09 11:47:05 +01:00
Rossen Stoyanchev
b48ddef4c6 Upgrade to RSocket 1.0.1 2020-06-09 08:59:55 +01:00
Rossen Stoyanchev
2002a1689a Adapt test to changes in RSocket Java
See gh-24934
2020-04-25 07:11:34 +01:00
Sam Brannen
5eba1ae73c Avoid deprecation warning in DefaultRSocketRequesterBuilderTests 2020-04-22 19:19:34 +02:00
Rossen Stoyanchev
1904e9b7e7 Disable failing test temporarily 2020-04-20 10:16:40 +01:00
Rossen Stoyanchev
ed8c61a852 Upgrade to RSocket 1.0 RC7 snapshots 2020-04-20 09:42:28 +01:00
Sébastien Deleuze
3c354a9b18 Avoid using Mockito argument matcher in Mockk test 2020-04-07 16:38:09 +02:00
陈其苗
13970ae528 Use autoboxing instead of explicit wrapping in tests
Closes gh-24801
2020-04-01 14:34:20 +02:00
Qimiao Chen
7c831d2ef4 Replace anonymous inner classes with lambdas in tests
Closes gh-24808
2020-03-30 12:02:23 +02:00
Rossen Stoyanchev
3175f0771e Remove dumpString from DataBufferTestUtils
See gh-24786
2020-03-26 21:42:12 +00:00
Rossen Stoyanchev
7efb62091d MessagingRSocket correctly handles unconsumed input
Closes gh-24741
2020-03-20 10:03:56 +00: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
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
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
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
Sebastien Deleuze
9f242fac66 Add RSocketRequester retrieveAndAwaitOrNull extension
Closes gh-23874
2019-10-27 20:11:08 +01: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
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
5adc3d6666 Fix RSocketRequester API for requests without payload
This commit makes it possible to send requests without
requiring to call data(Mono.empty()). It introduces a
dedicated MetadataSpec interface and merge ResponseSpec
into RequestSpec for more flexibility.

Closes gh-23649
2019-09-18 16:00:16 +02:00