Commit Graph

506 Commits

Author SHA1 Message Date
Juergen Hoeller
e9db4d6f96 Proper resolution of Optional.empty() for header arguments
Issue: SPR-15151
2017-01-17 10:46:37 +01:00
Juergen Hoeller
62e530ec94 Resolve minor 4.3.x deprecations in master
Issue: SPR-15139
2017-01-16 21:43:12 +01:00
Juergen Hoeller
047786acef Revised InvocableHandlerMethod exception messages (controller vs endpoint vs handler)
Introduces dedicated MethodArgumentResolutionException for spring-messaging invocations.

Issue: SPR-15139
2017-01-16 21:14:46 +01:00
Sam Brannen
9ed66bf2eb Clean up warnings across code base 2017-01-07 01:54:38 +01:00
Gary Russell
80bc8fc596 Implement MessagingException.toString()
Issue: SPR-15091
Closes gh-1284
2017-01-05 10:25:04 +01:00
Rossen Stoyanchev
e62b104e03 Resource cleanup on shutdown in ReactorNettyTcpClient 2016-12-28 21:37:12 -05:00
Rossen Stoyanchev
698c885e06 Reconnect failures delegated to TcpConnectionHandler
When connecting with a ReconnectStrategy we can only report the outcome
of the first connect to the ListenableFuture<Void> return value.

Failures for all subsequent attempts to reconnect however must be
channeled to TcpConnectHandler#afterConnectFailure which is used in
the STOMP broker relay for example to publish
BroadcastAvailability(true/false) events.
2016-12-28 21:37:07 -05:00
Rossen Stoyanchev
ea274ebc0a Fix decoding issue in Reactor TcpClient
When decoding STOMP messages unread portions of a given input ByteBuf
must be kept until more input is received and the next complete STOMP
frame can be parsed.

In Reactor Net 2.x this was handled for us through the "remainder"
field in NettyChannelHandlerBridge. The Reactor Netty 0.6 upgrade
however applied only a simple map operator on the input ByteBuf
after which the buffer is relased.

This commit replaces the use of a simple map operator for decoding
and installs a ByteToMessageDecoder in the Netty channel pipeline
which has a built-in ability to preserve and merge unread input into
subsequent input buffers.
2016-12-28 21:36:37 -05:00
Rossen Stoyanchev
fdf88c9795 Workaround for onReadIdle issue in Reactor TcpClient
https://github.com/reactor/reactor-netty/issues/22
2016-12-28 21:36:37 -05:00
Rossen Stoyanchev
2a3e01399a Polish ReactorNettyTcpClient 2016-12-28 21:36:37 -05:00
Juergen Hoeller
5c48daa8eb Remove unused Log object from MessageHeaderAccessor
Issue: SPR-15045
2016-12-22 23:34:19 +01:00
Juergen Hoeller
ae62341fa3 Avoid deprecated Scheduler.shutdown() in favor of Scheduler.dispose() 2016-12-22 22:35:54 +01:00
Juergen Hoeller
4c005e6336 ResolvableType-based matching respects generic factory method return type
Includes consistent use of ResolvableType.resolve() wherever applicable.

Issue: SPR-15011
2016-12-17 23:10:48 +01:00
Stephane Maldini
2802926c1d update STOMP support to reactor-netty 0.6 2016-12-13 17:31:09 +00:00
Stephane Maldini
70bab23609 update STOMP support to reactor-netty 0.6 2016-12-13 17:29:43 +00:00
Rossen Stoyanchev
b3fa1b40a0 Synchronized updates of STOMP header key cache
Issue: SPR-14901
2016-12-08 11:13:57 -05:00
Christoph Dreis
9b76dc2ab4 SPR-14901 Allow customization of STOMP message header encoding
Fixes SPR-14901
2016-12-08 11:13:56 -05:00
Sergei Ustimenko
e4ed1f6ffd ChannelFutureMono renamed to FutureMono
In the latest reactor-netty there is renaming
of ChannelFutureMono class to FutureMono. Thus
build fails on the latest master.
2016-12-03 18:56:42 +01:00
Juergen Hoeller
f6fc0a86b3 Polishing
(cherry picked from commit 0028b29)
2016-12-01 20:11:47 +01:00
Rossen Stoyanchev
b874692452 Simplify ReactorNettyTcpClient input
Create a ReactorNettyCodec to hold the decoding and encoding function
and consumer along with a package-private sub-class that delegates to
StompDecoder and StompEncoder.

Issue: SPR-14531
2016-11-30 21:17:04 -05:00
Rossen Stoyanchev
85c93f5d67 Polish Reactor Netty TCP client support 2016-11-30 21:17:04 -05:00
Stephane Maldini
870f61fd8e update STOMP support to reactor-netty 2016-11-30 21:17:04 -05:00
Juergen Hoeller
5458a427a1 Polishing 2016-11-30 22:31:47 +01:00
Rossen Stoyanchev
a203b74d20 PayloadArgumentResolver has useDefaultResolution flag
Issue: SPR-14937
2016-11-28 17:00:22 -05:00
Sebastien Deleuze
a143b57d4b Polish Kotlin nullable support
This commit polishes Kotlin nullable support by reusing
MethodParameter#isOptional() instead of adding a new
MethodParameter#isNullable() method, adds
Kotlin tests and introduces Spring Web Reactive
support.

Issue: SPR-14165
2016-11-24 18:28:50 +01:00
Raman Gupta
fada91e538 Treat Kotlin nullable as non-required
Where `isOptional` is used, also check for `isNullable` i.e.
values are not considered required if they are Kotlin nullables:
- spring-messaging: named value method arguments
- spring-web: named value method arguments
- spring-webmvc: request parts

This means that Kotlin client code no longer has to explicity specify
"required=false" for Kotlin nullables -- this information is inferred
automatically by the framework.

Issue: SPR-14165
2016-11-24 17:18:55 +01:00
Juergen Hoeller
80931b211c Shared DefaultConversionService instance for simple fallback purposes
Issue: SPR-14948
2016-11-24 15:29:17 +01:00
Juergen Hoeller
9bf4d7cf4e Polishing 2016-11-22 14:57:00 +01:00
Christoph Dreis
a929e9ccaa Implement allocation-friendly method to get user count in SimpUserRegistry
SPR-14930
2016-11-21 21:02:10 +01:00
Juergen Hoeller
dc080cb1be Revised NoSuchBeanDefinitionException message and ResolvableType handling
Includes consistent quoting of qualified type names in related classes.

Issue: SPR-14831
2016-10-28 23:39:05 +02:00
Juergen Hoeller
dbaafdd04e MessageChannel declares send(Message) as default method
Issue: SPR-14854
2016-10-28 15:11:03 +02:00
Juergen Hoeller
3726c6f18d Polishing 2016-10-21 12:26:27 +02:00
Juergen Hoeller
eafaaa5cb8 Polishing 2016-10-12 17:11:04 +02:00
Juergen Hoeller
ffc781b163 Explicit calls on Buffer base type (for compatibility with covariant return type on JDK 9's ByteBuffer)
Issue: SPR-14645
2016-10-05 00:10:06 +02:00
Juergen Hoeller
fb7ae010c8 Avoid unnecessary generics on emptyMap/Set/List 2016-09-26 18:04:49 +02:00
Juergen Hoeller
a6b0b6e279 Efficient STOMP content-length header check
Issue: SPR-14747
2016-09-26 17:25:21 +02:00
Juergen Hoeller
c64f39943f Polishing 2016-09-26 17:20:30 +02:00
Juergen Hoeller
e188b4428e Polishing 2016-09-25 21:00:07 +02:00
Christoph Dreis
774e4c3dc1 Improve performance of StompEncoder
Fixes SPR-14747
2016-09-25 19:09:01 +02:00
Rossen Stoyanchev
99c7917124 Reset connection before delegating to handler
Resetting the connection first before invoking a failure callback on
the application handler ensures that any checks to isConnected will
return false.

Issue: SPR-14721
2016-09-19 09:04:23 -04:00
Juergen Hoeller
6dc1898dbb Timeout exceptions as RuntimeExceptions
Issue: SPR-14669
2016-09-15 08:54:17 +02:00
Rossen Stoyanchev
3bc1121b9d Check both connection and connected flag
Issue: SPR-14703
2016-09-14 17:19:49 -04:00
Juergen Hoeller
f592599349 Polishing
(cherry picked from commit 54db496)
2016-09-13 23:48:41 +02:00
Juergen Hoeller
03609c1518 Consistent comma splitting without regex overhead
Issue: SPR-14635
2016-08-30 23:56:58 +02:00
Rossen Stoyanchev
8b4f60b8e5 Support receipt on DISCONNECT with simple broker
Issue: SPR-14568
2016-08-29 18:31:19 -04:00
Juergen Hoeller
899ebd8ee2 Avoid collection lookups in StompCommand
Issue: SPR-14636
2016-08-29 11:54:21 +02:00
Juergen Hoeller
f3f691cc37 Revised assertions in StompHeaderAccessor
Issue: SPR-14625
2016-08-24 21:04:01 +02:00
Juergen Hoeller
c4fff6db1b Reintroduced MessageMethodArgumentResolver default constructor
Issue: SPR-14616
2016-08-23 13:20:02 +02:00
Juergen Hoeller
eeeab27f1f Polishing
(cherry picked from commit 35e247a)
2016-08-10 16:42:21 +02:00
Juergen Hoeller
59a24b406a Polishing 2016-08-10 14:20:42 +02:00