247 Commits

Author SHA1 Message Date
Juergen Hoeller
5528c8a93b Polishing 2014-12-30 13:11:46 +01:00
Juergen Hoeller
230aa07fbb Polishing 2014-12-29 20:15:54 +01:00
Juergen Hoeller
9362d0d547 PayloadArgumentResolver does not insist on configured Validator anymore
Issue: SPR-12567
(cherry picked from commit ed0e2f4)
2014-12-29 18:58:50 +01:00
Juergen Hoeller
90ae073854 Relaxed final declarations and protected doInvoke methods
Issue: SPR-12484
(cherry picked from commit 2496d68)
2014-12-07 22:13:03 +01:00
Juergen Hoeller
5f58cd3b79 Polishing
(cherry picked from commit 2675ce7)
2014-11-22 22:47:24 +01:00
Juergen Hoeller
e42e2330b3 Polishing 2014-11-11 03:21:43 +01:00
Sebastien Deleuze
b331d65019 Check STOMP headers against ending backslash
Issue: SPR-12418
(cherry picked from commit 1803348)
2014-11-11 03:02:25 +01:00
Juergen Hoeller
f691618967 Polishing 2014-11-01 13:00:54 +01:00
Juergen Hoeller
b91cab1fde Polishing 2014-09-26 22:18:15 +02:00
Juergen Hoeller
f8b729aa5f Polishing 2014-09-17 01:51:23 +02:00
Juergen Hoeller
d081a4530c Polishing 2014-09-04 02:37:36 +02:00
Juergen Hoeller
97bd0ccfec Polishing 2014-09-04 01:43:15 +02:00
Juergen Hoeller
eb3509a37c Polishing 2014-08-23 02:02:38 +02:00
Juergen Hoeller
93ad7f8def Polishing 2014-08-23 01:28:10 +02:00
Juergen Hoeller
54ba5c5e7b Polishing 2014-08-22 23:39:37 +02:00
Juergen Hoeller
9ad6618207 Polishing 2014-07-28 22:47:22 +02:00
Juergen Hoeller
6e95b2613e Polishing 2014-07-24 18:35:49 +02:00
Juergen Hoeller
845528a6cb Polishing 2014-07-10 18:18:44 +02:00
Juergen Hoeller
ede2150544 Polishing 2014-07-02 17:32:43 +02:00
Rossen Stoyanchev
5092414842 Improve SubscriptionRegistry subscription removal
This a backport of:
ce20abde51
083d415fc4

Issue: SPR-11931, SPR-11930
2014-07-01 14:35:22 -04:00
Juergen Hoeller
c16032b98a Consistent declaration of private static final logger variables
Issue: SPR-11905
(cherry picked from commit 18131bf)
2014-07-01 12:09:29 +02:00
Juergen Hoeller
e50507206f DefaultSubscriptionRegistry's removeSubscriptionInternal defensively handles non-existing destinations
Issue: SPR-11832
(cherry picked from commit 5a8e470)
2014-07-01 11:58:08 +02:00
Rossen Stoyanchev
40c203ca71 Minor fix in STOMP broker relay
This is a backport for a change made as part of:
113fd1180a

Issue: SPR-11884
2014-06-29 16:58:47 -04:00
Rossen Stoyanchev
482eff81e1 Await TcpClient shutdown in STOMP relay 2014-05-15 21:46:44 -04:00
Sebastien Deleuze
96da77ef75 Avoid ConcurrentModificationException
Removal of cached destination is now moved outside the for loop
that removes subscriptions to avoid ConcurrentModificationException.

Also since updateCache is a LinkedHashMap with accessOrder=true,
a simple access with updateCache.get() modify the map.
By iterating over updateCache.entrySet(), we avoid this update.

Issue: SPR-11755
2014-05-06 20:22:05 -04:00
Rossen Stoyanchev
21fd68150a Log ignored CONNECT messages at error level
Issue: SPR-11673
2014-04-30 11:12:32 -04:00
Rossen Stoyanchev
d20259be1d Log STOMP ERROR frames at error level
Issue: SPR-11673
2014-04-30 11:01:18 -04:00
Rossen Stoyanchev
6ca921021c Update log level
Issue: SPR-11673
2014-04-30 10:28:27 -04:00
Rossen Stoyanchev
790d62bcb1 Simplify and improve STOMP broker relay int tests 2014-04-29 23:01:40 -04:00
Rossen Stoyanchev
563476f57c Split destination cache into access vs update
Issue: SPR-11657
2014-04-29 22:16:49 -04:00
Rossen Stoyanchev
79de45b805 Add cache limit to DefaultSessionRegistry and polish
Issue: SPR-11657
2014-04-29 18:17:40 -04:00
Sebastien Deleuze
63a868dafb Fix DefaultSubscriptionRegistry when using pattern destinations
DestinationCache is now used for both plain and pattern
destinations. It stores internally the subscriptions map for each
cached destination. Subscriptions are initially created when there
is no cache for the requested destination, and are updated when
subscriptions change.

Issue: SPR-11657
2014-04-29 18:17:30 -04:00
Rossen Stoyanchev
cb712afa97 Improve handling of disconnects in STOMP broker relay
This is a backport of:
990f5bb720

Issue: SPR-11655
2014-04-28 10:08:00 -04:00
Rossen Stoyanchev
a4d6f8473e Upgrade to reactor 1.1 RC1 2014-04-25 12:32:36 -04:00
Rossen Stoyanchev
443fb8e4ee Fix issue with subscribe destination
The original fix for SPR-11423:
32e5f57e64

was insufficient when using an external broker since the original
destination header has to be in the "native headers" map (i.e. with
STOMP headers) in order to be included in messages broadcast by
the broker.
2014-04-25 12:17:08 -04:00
Rossen Stoyanchev
1b59b4eb26 Add Reactor 11 support
This change adds support for Reactor 1.1 in spring-messaging in
addition to Reactor 1.0.1 -- whichever is present on the classpath is
used.

Note also the module name change:
reactor-tcp:1.0.1 -> reactor-net:1.1.0

Issue: SPR-11636
2014-04-23 23:35:49 -04:00
Juergen Hoeller
52f580149f Polishing 2014-04-17 22:42:33 +02:00
Juergen Hoeller
02e8198283 MessageConversionException offers constructor without cause argument now, plus related polishing
Issue: SPR-11653
(cherry picked from commit 2888775)
2014-04-17 22:14:01 +02:00
Brian Clozel
1c45d7573c Fix @SubscribeMapping MESSAGE response destination
Prior to this commit, @SubscribeMapping mapped methods (backed with
@SendTo* annotations, or not) would send MESSAGEs with the wrong
destination. Instead of using the original SUBSCRIBE destination, it
would use the lookup path computed from the configured prefixes in the
application.

This commit fixes this issue - now @SubscribeMapping MESSAGEs use the
original SUBSCRIBE destination.

Issue: SPR-11648
2014-04-04 12:45:19 +02:00
Rossen Stoyanchev
e21c47d4ce Optimize performance in StompEncoder/Decoder escaping
Issue: SPR-11643
2014-04-01 14:16:10 -04:00
Stephane Nicoll
c1eb50ef48 polishing 2014-03-25 16:49:54 +01:00
Rossen Stoyanchev
2c1d5efbb0 Introduce base exception class for arg resolution
Issue: SPR-11584
2014-03-25 11:02:24 -04:00
Stephane Nicoll
2aee0d8250 Improve MessageMethodArgumentResolver
This commit validates that the payload type of the message is
assignable to the one declared in the method signature. If that
is not the case, a meaningful exception message is thrown with
the types mismatch.

Prior to this commit, only the Message interface could be defined
in the method signature: it is now possible to define a sub-class
of Message if necessary which will match as long as the Message
parameter is assignable to that type.

Issue: SPR-11584
2014-03-25 10:12:29 -04:00
Rossen Stoyanchev
8780464c64 Update test to catch CI server issue 2014-03-25 08:24:53 -04:00
Rossen Stoyanchev
c11484b2e7 Add WebSocket transport configuration support
Issue: SPR-11527
2014-03-24 19:20:38 -04:00
Rossen Stoyanchev
545c4effb1 Polish StompDecoder and the new Buffering sub-class
Issue: SPR-11527
2014-03-24 19:20:37 -04:00
Sebastien Deleuze
bbdb72d808 Add configuration for message buffer size limit
BufferingStompDecoder message buffer size limit can now be configured
with JavaConfig MessageBrokerRegistry.setMessageBufferSizeLimit() or
with XML <websocket:message-brocker message-buffer-size="">.

Issue: SPR-11527
2014-03-24 19:20:37 -04:00
Rossen Stoyanchev
ebffd67b5e Add BufferingStompDecoder
Before this change the StompDecoder decoded and returned only the first
Message in the ByteBuffer passed to it. So to obtain all messages from
the buffer, one had to loop passing the same buffer in until no more
complete STOMP frames could be decoded.

This chage modifies StompDecoder to return List<Message> after
exhaustively decoding all available STOMP frames from the input buffer.
Also an overloaded decode method allows passing in Map that will be
populated with any headers successfully parsed, which is useful for
"peeking" at the "content-length" header.

This change also adds a BufferingStompDecoder sub-class which buffers
any content left in the input buffer after parsing one or more STOMP
frames. This sub-class can also deal with fragmented messages,
re-assembling them and parsing as a whole message.

Issue: SPR-11527
2014-03-24 19:20:37 -04:00
Juergen Hoeller
dd7f54c3c0 Revised ResizableByteArrayOutputStream as an actual subclass of ByteArrayOutputStream, and consistently applied appropriate ByteArrayOutputStream initial capacities across the codebase
Issue: SPR-11594
2014-03-24 22:57:38 +01:00
Rossen Stoyanchev
929e9ca401 Raise MessageConversionException in @Payload resolver
If a payload is present but conversion returns null (meaning no
converter knows how to convert), raise a MessageConversionException
that provides information about the type we were trying to convert
to and the message itself whose headers (namely content-type) contain
crucial information required to debug the problem.

Issue: SPR-11577
2014-03-21 08:59:12 -04:00