Commit Graph

345 Commits

Author SHA1 Message Date
Rossen Stoyanchev
04840166af DefaultSubscriptionRegistry returns safe to iterate Map
Prior to this change when adding subscriptions
DefaultSubscriptionRegistry (incorrectly) made a copy of the given map
for its "access" cache rather than for its "update" cache.

Issue: SPR-12665
2015-02-02 13:57:46 -05:00
Rossen Stoyanchev
84807c5d61 Fix minor test issues
Issue: SPR-12615
2015-01-20 17:16:55 -05:00
Juergen Hoeller
dcb821edb5 Polishing
(cherry picked from commit 730bd02)
2014-12-30 15:07:19 +01:00
Juergen Hoeller
bc075c713f Polishing 2014-12-29 20:34:18 +01:00
Juergen Hoeller
ed0e2f4445 PayloadArgumentResolver does not insist on configured Validator anymore
Issue: SPR-12567
2014-12-29 12:55:37 +01:00
Sebastien Deleuze
fbd85925de Use Jackson improved default configuration everywhere
With this commit, Jackson builder is now used in spring-websocket
to create the ObjectMapper instance.

It is not possible to use the builder for spring-messaging
and spring-jms since these modules don't have a dependency on
spring-web, thus they now just customize the same features:
 - MapperFeature#DEFAULT_VIEW_INCLUSION is disabled
 - DeserializationFeature#FAIL_ON_UNKNOWN_PROPERTIES is disabled

Issue: SPR-12293
2014-12-03 09:49:41 +01:00
Rossen Stoyanchev
ed4cd9947f Add private method to remove duplication 2014-12-02 15:26:50 -05:00
Rossen Stoyanchev
fa89ae244f Enrich CONNECTED frames with Principal
Issue: SPR-12479
2014-12-02 14:30:36 -05:00
Juergen Hoeller
2496d68e9f Relaxed final declarations and protected doInvoke methods
Issue: SPR-12484
2014-12-01 15:07:24 +01:00
Sebastien Deleuze
400738e804 Polish MessageHeaderAccessor
Issue: SPR-12431
2014-11-25 11:22:10 +01:00
Juergen Hoeller
929cda6790 Allow custom @Validated annotations for handler method parameters
Issue: SPR-12406
2014-11-24 23:34:24 +01:00
Juergen Hoeller
2675ce7c9f Polishing 2014-11-22 18:05:35 +01:00
Brian Clozel
75c70fac3d Fix user destination parsing in simp messaging
This commit fixes the parsing of message destinations such as
"/user/anna/queue/foo", reverting a regression introduced by SPR-11506,
which worked well with @SendToUser use cases but caused issues for
messages sent to other users.

Issue: SPR-12444
2014-11-21 15:23:32 +01:00
Juergen Hoeller
a831ed524f Polishing 2014-11-11 03:09:29 +01:00
Juergen Hoeller
05bdc2cf77 Consistent declaration and use of UTF-8 Charset constants, plus related polishing 2014-11-11 02:38:30 +01:00
Sebastien Deleuze
18033486ae Check STOMP headers against ending backslash
Issue: SPR-12418
2014-11-10 17:12:08 +01:00
Juergen Hoeller
a9c47df0c1 Polishing 2014-11-01 14:05:32 +01:00
Juergen Hoeller
1146d5ba1d Polishing 2014-10-29 22:44:59 +01:00
Rossen Stoyanchev
da612d079f Replace "if(" with "if (" 2014-10-27 09:04:23 -04:00
Rossen Stoyanchev
01aa64c534 Simple broker sends notice after disconnect
Before this change the simple broker simply removed subscriptions
upon receiving a DISCONNECT message assuming it was a result of
a client STOMP WebSocket session ending.

However, if the server-side application sends a DISCONNECT to
the broker in order to terminate a session, the STOMP WebSocket
session could remain unware without any further action. This
change ensures the simple broker sends a DISCONNECT_ACK message
downstream whenever it receives a DISCONNECT.

Issue: SPR-12288
2014-10-24 09:48:18 -04:00
Rossen Stoyanchev
687955a704 Add ImmutableMessageChannelInterceptor
This change adds a ChannelInterceptor that flips the immutable flag on
messages being sent. This allows components sending messages to leave
the message mutable for interceptors to further apply modifications
before the message is sent (and exposed to concurrency).

The interceptor is automatically added with the STOMP/WebSocket Java
and XML config and the StompSubProtocolHandler leaves parsed incoming
messages mutable so they can be further modified before being sent.

Issue: SPR-12321
2014-10-23 15:25:51 -04:00
Juergen Hoeller
8325b10080 Consistent formatting of license headers, package javadocs, and import declarations 2014-10-21 01:44:07 +02:00
Sam Brannen
9bc32ac199 Delete unused imports in spring-messaging module 2014-10-13 20:33:28 +02:00
Juergen Hoeller
473ed1a672 Polishing 2014-10-04 01:01:53 +02:00
Juergen Hoeller
b6a3808a97 AbstractMessageChannel triggers afterSendCompletion with previously resolved non-null Message in case of preSend returning null
Issue: SPR-12295
2014-10-04 00:40:53 +02:00
Juergen Hoeller
44e29210cb ExecutorSubscribableChannel's SendTask actually returns local MessageHandler now
Issue: Issue: SPR-12272
2014-10-01 01:05:39 +02:00
Sam Brannen
7aa3cc9bb2 Clean up MessageBrokerConfigurationTests
- clean up warnings
 - simplify ApplicationContext configuration
2014-09-30 16:52:50 +02:00
Sam Brannen
5f4eb4dd55 Complete Javadoc for MessageHandlingRunnable 2014-09-30 15:30:15 +02:00
Rossen Stoyanchev
521bbfcf56 Allow configuring custom ThreadPoolTaskExecutor
Issue: SPR-12272
2014-09-29 23:02:40 -04:00
Rossen Stoyanchev
179b236608 Add MessageHandlingRunnable
Issue: SPR-12272
2014-09-29 22:41:09 -04:00
Rossen Stoyanchev
84137ab986 Polish ExecutorSubscribableChannel
Consolidate inner classes used to invoke a subscriber with
interceptors.
2014-09-29 22:23:45 -04:00
Rossen Stoyanchev
ceb79c9bee Use InterceptableChannel in AbstractBrokerMessageHandler
Issue: SPR-12218
2014-09-26 13:25:52 -04:00
Rossen Stoyanchev
6f1ab8d02d Add InterceptableChannel
The new contract allows registration of interceptors with any
MessageChannel implementation hierarchy -- for example the one in the
Spring Framework or the one in Spring Integration.
2014-09-26 13:21:27 -04:00
Rossen Stoyanchev
6c57c3e4b5 Catch exception while clearing TCP conn to broker
When a DISCONNECT is sent to the broker, we proactively close the TCP
connection unless the DISCONNECT has a receipt header. Depending on
the timing, the broker may also close the connection on its side.
That appears to cause an exception in reactor on the CI server, e.g.:

https://build.spring.io/browse/SPR-PUB-JOB1-1715/test/case/135247530

This change traps the exceptions and prevents it from propagating.
2014-09-26 12:09:59 -04:00
Rossen Stoyanchev
371d93b346 Detect unsent DISCONNECT messages
This change uses a ChannelInterceptor (inserted at index 0) to detect
when a DISCONNECT message is precluded from being sent on the
clientInboundChannel. This can happen if another interceptor allows
a runtime exception out from preSend or returns false.

It is crucial for such messages to be processed, so when detected
they're processed still.

Issue: SPR-12218
2014-09-25 23:22:12 -04:00
Rossen Stoyanchev
1feeceb6de Move MessageChannel fields up to AbstractMessageBroker 2014-09-25 22:48:43 -04:00
Juergen Hoeller
3836aa051f Message broker thread pools should be set up in allowCoreThreadTimeOut mode
Issue: SPR-12249
2014-09-25 01:29:00 +02:00
Sam Brannen
bf93f0c5e9 Clean up warnings in spring-messaging 2014-09-22 14:30:21 +02:00
Rossen Stoyanchev
237b50a9c8 Allow configuring custom argument types
The WebSocket messaging namespace now exposes configuration options for
custom argument resolvers and return value handlers.

Issue: SPR-12217
2014-09-19 16:47:39 -04:00
Juergen Hoeller
1e7bfd91a7 Polishing 2014-09-10 01:28:54 +02:00
Juergen Hoeller
5790fc904a Consistent support for java.util.Optional for all applicable handler method arguments
Issue: SPR-12171
2014-09-10 01:27:46 +02:00
Juergen Hoeller
86b7118da8 Polishing 2014-09-04 02:30:25 +02:00
Juergen Hoeller
20c2ba35dc Polishing 2014-09-04 00:55:38 +02:00
Rossen Stoyanchev
96563c7eea Update Javadoc in SimpMessageSendingOperations
Issue: SPR-12143
2014-09-02 15:41:17 -04:00
Juergen Hoeller
820a160578 Polishing 2014-08-23 01:57:52 +02:00
Juergen Hoeller
078f23d6e6 Polishing 2014-08-23 01:07:01 +02:00
Juergen Hoeller
b93dd95475 Polishing 2014-08-22 22:55:57 +02:00
Juergen Hoeller
28a966f544 MessageBuilder avoids intermediate HashMap for MessageHeaders building
Issue: SPR-11468
2014-08-22 22:55:48 +02:00
Phillip Webb
ac8326d2df Polish mockito usage
Consistent use of BDDMockito rather than standard Mockito.
2014-08-11 16:23:11 -07:00
Juergen Hoeller
c06ac06bdd JmsMessagingTemplate uses local convertJmsException template method instead of generic MessagingExceptionTranslator interface
This commit also turns MessagingException into a NestedRuntimeException subclass which delivers a root message that has the cause message appended to it. That's a common expectation with the use of Spring exceptions since all of our exception hierarchies have historically been designed that way.

Issue: SPR-12064
Issue: SPR-12038
2014-08-09 22:06:50 +02:00