Commit Graph

371 Commits

Author SHA1 Message Date
Sebastien Deleuze
97936140cc Support HandlerMethod parameter in @MessageExceptionHandler
Issue: SPR-13196
2015-07-07 15:43:39 +02:00
Juergen Hoeller
f79a5c12d5 DefaultSubscriptionRegistry defensively checks for removal between keySet and get calls
Issue: SPR-13205
2015-07-07 11:11:56 +02:00
Juergen Hoeller
fefc4b478f Polishing 2015-07-07 02:22:44 +02:00
Juergen Hoeller
145d88d152 Polishing 2015-07-07 00:26:31 +02:00
Juergen Hoeller
f0175bc42d DefaultSubscriptionRegistry uses deep LinkedMultiValueMap copies between accessCache and updateCache
Issue: SPR-13185
2015-07-07 00:25:47 +02:00
Rossen Stoyanchev
0b43e4e4f2 Add concurrent test and fix potential NPE
After SPR-12884 (4.2 RC1) introduced support for a selector header
expression on SUBSCRIBE frames, messages from the destination cache
are further filtered based on the selector expression. While adding a
test to find subscriptions at the same time as unsubscribing, a
potential NPE was exposed. This commit fixes the NPE.

Issue: SPR-13204
2015-07-06 17:07:20 -04:00
Juergen Hoeller
dc1f921f5c Split between basic MethodParameter and SynthesizingMethodParameter
This split avoids a package tangle (between core and core.annotation) and also allows for selective use of raw annotation exposure versus synthesized annotations, with the latter primarily applicable to web and message handler processing at this point.

Issue: SPR-13153
2015-06-30 00:02:02 +02:00
Rossen Stoyanchev
1153969ea2 Polish 2015-06-15 14:56:56 -04:00
Josh King
11824893a9 Header values are optional in Stomp 1.1 and 1.2 2015-06-15 14:56:56 -04:00
Sam Brannen
ab24592662 Introduce alias for 'value' attribute in @SendToUser
Issue: SPR-11393
2015-06-01 14:14:23 +02:00
Sam Brannen
53d095aa28 Polish Javadoc for @SubscribeMapping 2015-06-01 13:56:44 +02:00
Sam Brannen
a6f53ef2a7 Polish Javadoc for @MessageMapping 2015-06-01 13:37:08 +02:00
Sam Brannen
7b10dc6e93 Fix typo in Javadoc 2015-05-29 23:24:09 +02:00
Sam Brannen
60a5ec87d0 Introduce alias for 'value' attribute in @Header
This commit introduces 'name' as an alias for 'value' in @Header.

Issue: SPR-11393
2015-05-29 23:23:52 +02:00
Sam Brannen
35c3e7c0f3 Polishing 2015-05-29 23:10:25 +02:00
Sam Brannen
250787a35a Introduce alias for 'value' attribute in @Payload
This commit introduces 'expression' as an alias for 'value' in @Payload.

Issue: SPR-11393
2015-05-29 22:58:55 +02:00
Juergen Hoeller
05d475a275 Polishing 2015-05-22 23:50:47 +02:00
Rossen Stoyanchev
c48e8708a7 Fix NPE in DefaultSimpUserRegistry 2015-05-22 13:44:09 -04:00
Rossen Stoyanchev
92bd7bba50 Restore userSessionRegistry field in StompSubProtocolHandler
This change ensures that the deprecated UserSessionRegistry is still
used if configured.
2015-05-22 13:44:09 -04:00
Rossen Stoyanchev
0db216daab Polish 2015-05-22 09:06:18 -04:00
Sebastien Deleuze
5255e7ae21 Support CompletableFuture in @MessageMapping handler methods
Issue: SPR-12207
2015-05-22 11:30:56 +02:00
Sebastien Deleuze
d3db99c201 Support ListenableFuture in @MessageMapping handler methods
This commit introduces support for asynchronous return values thanks
to the new AsyncHandlerMethodReturnValueHandler interface. Out of
the box support for ListenableFuture is also provided.

Issue: SPR-12168
2015-05-22 11:29:13 +02:00
Juergen Hoeller
b4095c3e1d Class identity comparisons wherever possible
Issue: SPR-12926
2015-05-20 14:34:16 +02:00
Sebastien Deleuze
876c9694c4 Allow use of @JsonView on @MessageMapping methods
Issue: SPR-12741
2015-05-19 15:35:40 +02:00
Stephane Nicoll
cf391f5ce1 polish
Remove unused imports
2015-05-19 08:49:01 +02:00
Rossen Stoyanchev
696a010e81 Add SubProtocolErrorHandler
Issue: SPR-12732
2015-05-15 18:18:05 -04:00
Juergen Hoeller
49c600b234 Resolved cyclic dependency between handler.invocation and handler.annotation
Issue: SPR-12696
2015-05-12 22:04:59 +02:00
Rossen Stoyanchev
281588d7bb Add SimpUserRegistry with multi-server support
This change introduces SimpUserRegistry exposing an API to access
information about connected users, their sessions, and subscriptions
with STOMP/WebSocket messaging. Provides are methods to access users
as well as a method to find subscriptions given a Matcher strategy.

The DefaultSimpUserRegistry implementation is also a
SmartApplicationListener which listesn for ApplicationContext events
when users connect, disconnect, subscribe, and unsubscribe to
destinations.

The MultiServerUserRegistry implementation is a composite that
aggregates user information from the local SimpUserRegistry as well
as snapshots of user  on remote application servers.

UserRegistryMessageHandler is used with MultiServerUserRegistry. It
broadcats user registry information through the broker and listens
for similar broadcasts from other servers. This must be enabled
explicitly when configuring the STOMP broker relay.

The existing UserSessionRegistry which was primiarly used internally
to resolve a user name to session id's has been deprecated and is no
longer used. If an application configures a custom UserSessionRegistr
still, it will be adapted accordingly to SimpUserRegistry but the
effect is rather limited (comparable to pre-existing functionality)
and will not work in multi-server scenarios.

Issue: SPR-12029
2015-05-12 15:29:12 -04:00
Rossen Stoyanchev
eb9eadbb50 Polish 2015-05-07 12:01:54 -04:00
Arjen Poutsma
a36319e91c Introduce Marshalling MessageConverter
This commit introduces a messaging.converter.MessageConverter that
marshals to/from XML using the abstractions provided in the OXM module.

Issue: SPR-12726
2015-05-07 12:01:54 -04:00
Juergen Hoeller
1cc042d4c7 Polishing 2015-05-07 16:03:15 +02:00
Sam Brannen
7a690df925 Remove trailing whitespace from Java source code 2015-05-06 20:08:42 +02:00
Rossen Stoyanchev
5538863dc9 Use shared eventLoopGroup in Reactor2TcpClient 2015-05-04 06:08:25 -04:00
Stephane Maldini
7891c0d5ca Update reactor2 support 2015-04-30 10:59:11 +02:00
Stephane Maldini
5ebc1a8b60 Update to latest reactor 2.0.1 snapshot 2015-04-30 10:59:00 +02:00
Rossen Stoyanchev
60b19c784d Update TCP/Reactor
Issue: SPR-12599
2015-04-24 07:19:04 -04:00
Stephane Maldini
74c0250525 Upgrade to Reactor 2
Issue: SPR-12599
2015-04-24 07:18:42 -04:00
Rossen Stoyanchev
16ee69203c Add support for destination vars in @SendTo/SendToUser
Issue: SPR-12170
2015-04-22 17:54:41 -04:00
Rossen Stoyanchev
b6327acec8 Add SpEL based selector to DefaultSubscriptionRegistry
Issue: SPR-12884
2015-04-21 22:50:32 -04:00
Rossen Stoyanchev
c29eae3307 Support user destinations with multiple app servers
This change adds support for broadcasting messages with unresolved
user destinations so that other servers can try to resolve it.
That enables sending messages to users who may be connected to a
different server.

Issue: SPR-11620
2015-04-17 11:55:44 -04:00
Rossen Stoyanchev
c384945a17 Polish "user" destination support package
Issue: SPR-11620
2015-04-17 11:55:44 -04:00
Juergen Hoeller
10a51a4f19 InvocableHandlerMethod logs argument resolution exceptions at debug level
Issue: SPR-12925
2015-04-16 20:26:11 +02:00
Rossen Stoyanchev
de9675bf5a Support heartbeat in SimpleBrokerMessageHandler
Issue: SPR-10954
2015-04-06 16:57:23 -04:00
Rossen Stoyanchev
ae3417133b Add public access to PathMatcher in WebSocket config
Issue: SPR-12845
2015-03-26 16:50:33 -04:00
Juergen Hoeller
d23893fd25 Consistent javadoc param declarations for type variables 2015-03-25 00:44:01 +01:00
Juergen Hoeller
4e28da439d TcpConnection extends java.io.Closeable
Issue: SPR-12849
2015-03-25 00:42:14 +01:00
Rossen Stoyanchev
4886edd10b Send STOMP ERROR if external broker not available
Issue: SPR-12820
2015-03-20 17:34:31 -04:00
Juergen Hoeller
898c24fcdd Optimized access to resolved bean type (avoiding BeanFactory locks)
Revised HandlerMethod.getBeanType() impl for both web and messaging.
In addition, HandlerMethods get created with the internal BeanFactory now.

Issue: SPR-12832
2015-03-20 17:35:44 +01:00
Rossen Stoyanchev
41e437066e Support @MessageExceptionHandler w/ @ControllerAdvice
This change adds support for global @MessageExceptionHandler methods
with STOMP over WebSocket messages. Such methods can be added to
@ControllerAdvice annotated components, much like @ExceptionHandler
methods for Spring MVC.

Issue: SPR-12696
2015-03-19 14:21:24 -04:00
Sam Brannen
bf0703e07e Delete unused imports in spring-messaging 2015-03-17 17:29:38 +01:00