Commit Graph

354 Commits

Author SHA1 Message Date
Sam Brannen
7dc522f0d6 Clean up warnings in Gradle build 2019-03-12 19:36:14 +01:00
Juergen Hoeller
17930d6c27 Consistent formatting and related polishing 2019-03-07 17:25:48 +01:00
Rossen Stoyanchev
9e7f557b4a Updates for buffer management in RSocket
- Integration tests run with zero copy configuration.
- RSocketBufferLeakTests has been added.
- Updates in MessagingRSocket to ensure proper release

See gh-21987
2019-03-04 23:35:43 -05:00
Rossen Stoyanchev
23b39ad27b Explicit handling of void return values
Do give HandlerMethodReturnValueHandler's a chance to handle return
values so the RSocket reply header is always set.

See gh-21987
2019-03-04 23:35:43 -05:00
Rossen Stoyanchev
fa95b010cb Direct delegation to RSocketMessageHandler
Simplify handling by eliminating the use of a message channel. Instead
MessageHandlerAcceptor now extends from RSocketMessageHandler and
delegates directly to it.

See gh-21987
2019-03-04 23:35:43 -05:00
Rossen Stoyanchev
4e1c0c6826 @MessageExceptionHandler supports error signal
Before this change if a controller method returned a Publisher whose
first signal was an error, the error signal would not be delegated to
a @MessageExceptionHandler method as expected.

To make this work for now we use a package private local copy of the
ChannelSendOperator from spring-web.

See gh-21987
2019-03-04 23:35:43 -05:00
Rossen Stoyanchev
d6f4ec8c33 MessagingAcceptor/RSocket refinements + upgrade to 0.11.17
See gh-21987
2019-03-04 23:35:43 -05:00
Rossen Stoyanchev
8bdd709683 RSocketRequester, RSocketStrategies, PayloadUtils
See gh-21987
2019-03-04 23:35:43 -05:00
Rossen Stoyanchev
4e78b5df2f RSocket @MessageMapping handling
See gh-21987
2019-03-04 23:35:43 -05:00
Rossen Stoyanchev
f2bb95ba7b Payload encoding/decoding and handling refinements
See gh-21987
2019-03-04 23:35:43 -05:00
Rossen Stoyanchev
ceccd9fbee Polish
Updates to synchronize with newly created reactive equivalents.
2019-03-04 23:35:43 -05:00
Rossen Stoyanchev
567c559da8 Resolvers for destination vars and headers
See gh-21987
2019-03-04 23:35:43 -05:00
Rossen Stoyanchev
dda40c1516 Reactive @MessageMapping
See gh-21987
2019-03-04 23:35:43 -05:00
Rossen Stoyanchev
421090ca35 Reactive AbstractMessageMethodHandler
See gh-21987
2019-03-04 23:35:43 -05:00
Rossen Stoyanchev
e3e1ffc986 Encoder/Decoder based payload serialization
See gh-21987
2019-03-04 23:35:43 -05:00
Rossen Stoyanchev
bcf4f3911b Reactive InvocableHandlerMethod in spring-messaging
See gh-21987
2019-03-04 23:35:43 -05:00
Sebastien Deleuze
0b9522c84e Migrate Kotlin Mockito tests to Mockk
Closes gh-22345
2019-02-05 15:47:08 +01:00
Rossen Stoyanchev
38ae282c3b Update log category precision for all tests
Replace the full category capped at 36 chars with the class name only
and 1 char per package, e.g. org.apache.commons.Foo -> o.a.c.Foo
2018-12-12 11:40:33 -05:00
Hanope
bfb49c7249 Fix typos
See gh-2019
2018-11-19 08:41:21 +01:00
Rossen Stoyanchev
ed1d63dcc3 ResolvableMethod copy in spring-messaging src/test 2018-11-08 13:29:21 -05:00
Rossen Stoyanchev
48654c6483 Polish 2018-11-01 14:21:00 -04:00
Rossen Stoyanchev
7c36549e3a Consistent InvocableHandlerMethod implementations
This commit makes the 3 existing InvocableHandlerMethod types more
consistent and comparable with each other.

1. Use of consistent method names and method order.

2. Consistent error formatting.

3. Explicit for loops for resolving argument values in webflux variant
because that makes it more readable, creates less garabage, and it's
the only way to bring consistency since the other two variants cannot
throw exceptions inside Optional lambdas (vs webflux variant which can
wrap it in a Mono).

4. Use package private HandlerMethodArgumentComposite in webflux
variant in order to pick up the resolver argument caching that the
other two variants have.

5. Polish tests.

6. Add missing tests for messaging variant.
2018-10-30 16:36:01 -04:00
Rossen Stoyanchev
c01f350abe Move MonoToListenableFutureAdapter to spring-core
This was a package private class in spring-messaging since 5.0, and was
recently made public in 5.1. This commit promotes it to spring-core
where it belongs next to all other ListenableFuture support classes.

Follow-up refactoring for SPR-17336
2018-10-09 16:26:24 -04:00
Rossen Stoyanchev
bef22ec9b5 Consistent MonoToListenableFutureAdapter.cancel()
Issue: SPR-17336
2018-10-09 14:55:04 -04:00
Rossen Stoyanchev
430065c31d Order property for SimpUserRegistry
Issue:SPR-17142
2018-08-13 11:56:34 +03:00
Sam Brannen
cfb1ed1009 Clean up warnings and delete dead code 2018-08-12 15:55:11 +02:00
Juergen Hoeller
90d395edcf Polishing 2018-07-24 22:18:12 +02:00
Juergen Hoeller
02403f6a34 Polishing 2018-07-24 21:44:43 +02:00
Rossen Stoyanchev
7500b144ae Option to preserve publish order
Issue: SPR-13989
2018-07-23 23:24:39 -04:00
Sebastien Deleuze
0def1640f2 Support single-value reactive types in @MessageMapping
This commit adds support for single-value reactive types in
@MessageMapping by converting them using ReactiveAdapterRegistry
and MonoToListenableFutureAdapter.

MonoToListenableFutureAdapter previously package private and used only
in org.springframework.messaging.tcp.reactor has been moved to
org.springframework.messaging.support and made public in order to be
used by ReactiveReturnValueHandler as well.

Issue: SPR-16634
2018-07-23 15:20:48 +02:00
Rossen Stoyanchev
a40d25a760 Remove no-op classes in web-related Java config 2018-07-11 11:10:03 -04:00
Phillip Webb
a89e716cc7 Use tabs rather than spaces in tests
Update tests to ensure that tabs are used instead of spaces. Also
consistently apply a new line at the end of each file.

Issue: SPR-16968
2018-06-28 10:28:44 +02:00
Rossen Stoyanchev
f4bffea739 Support for @SendTo and @SendToUser for same method
Issue: SPR-16891
2018-06-11 12:42:55 -04:00
Rossen Stoyanchev
7a70f7c5d8 Polish @SendTo test 2018-06-11 12:42:55 -04:00
Juergen Hoeller
646d7f9e57 Unit tests for @MessageExceptionHandler cause and error resolution
Issue: SPR-16912
2018-06-11 13:44:43 +02:00
Rossen Stoyanchev
fbf25c536d ChannelInterceptor default methods + deprecate adapter 2018-05-23 21:48:19 -04:00
Rossen Stoyanchev
e043481a26 STOMP client supports setting accept-version
Issue: SPR-16844
2018-05-18 21:32:46 -04:00
Rossen Stoyanchev
f7029ffca6 Uncomment ignored test after Reactor Core fix 2018-05-02 15:44:24 -04:00
Rossen Stoyanchev
4c021d04ce @Ignore failing test from reactor-core regression 2018-05-02 07:23:46 -04:00
Rossen Stoyanchev
ff2228fdaf Selector header name is exposed for configuration
Issue: SPR-16732
2018-04-16 23:56:30 -04:00
Juergen Hoeller
d7cab23e6d Consistent use of StringUtils.toStringArray
(cherry picked from commit 6d11b40)
2018-02-16 20:49:17 +01:00
Juergen Hoeller
3b810f3544 Consistent Class array vs vararg declarations (and related polishing) 2018-02-14 14:44:00 +01:00
Rossen Stoyanchev
0585fb3999 Polish 2018-02-12 22:04:53 -05:00
Rossen Stoyanchev
4ee09c89b5 Fix regression in MappingJackson2MessageConverter
As of 4.3.13 MappingJackson2MessageConverter uses the MethodParameter
hint to obtain generic type information but it needs to be careful, and
nest one level, if the target parameter type has a Message wrapper.

Issue: SPR-16486
2018-02-12 21:30:26 -05:00
Rossen Stoyanchev
0fb31c5e36 Refine "." separator support for STOMP messaging
After this commit DefaultUserDestinationResolves no longer looks at
whether AntPathMatcher is configured with "." as separator and rather
expects to be explicitly told whether to keep the leading slash in
translated destinations which actually depends on what the message
broker supports (e.g. RabbitMQ "/", Artemis ".") or how it is
configured (simple broker could be either way).

There is also a minor improvement in SimpMessagingTemplate to ensure
user destinations are correctly formed based on what the
DefaultUserDestinationResolver expects. When using "." as separtor it
allows sending messages to "queue.q1" rather than "/queue.q1".

Issue: SPR-16275
2018-01-19 21:02:43 -05:00
Rossen Stoyanchev
17f9b61249 Polish MessageBrokerConfigurationTests 2018-01-19 21:02:43 -05:00
Rossen Stoyanchev
583201b02c MappingJackson2MessageConverter uses generic type
Issue: SPR-16252
2017-12-12 22:32:33 -05:00
Rossen Stoyanchev
64bc9b4311 Do match message type
SimpMessageTypeMessageCondition was lenient in matching the message
type, essentially matching on any non-null message type with an exact
match given a preference only in comparing mulitple matches.

This commit modifies matching logic to look for an exact match.

Issue: SPR-16109
2017-11-01 09:21:36 -04:00
Rossen Stoyanchev
1cc5afe24b Fix lines over 120 characters
https://github.com/spring-projects/spring-framework/wiki/Spring-Framework-Code-Style#line-wrapping
2017-10-20 16:42:26 -04:00
Juergen Hoeller
ac9cfefaff TaskExecutorRegistration does not apply its default settings to a user-provided executor
Also, ChannelRegistration.setInterceptors is deprecated now: in favor of a fluently named interceptors(...) method which is documented to add the given interceptors to the channel's current list.

Issue: SPR-15962
Issue: SPR-15976
2017-09-19 13:47:43 +02:00