Commit Graph

1122 Commits

Author SHA1 Message Date
Andy Wilkinson 9e20a25607 Introduce SubProtocolHandler abstraction
Add SubProtocolHandler to encapsulate the logic for using a
sub-protocol.

A SubProtocolWebSocketHandler is also provided to
delegate to the appropriate SubProtocolHandler based on the
negotiated sub-protocol value at handshake.

StompSubProtocolHandler provides handling for STOMP messages.

Issue: SPR-10786
2013-08-01 17:31:27 -04:00
Andy Wilkinson 4390591b68 Make BeanFactoryMCDR BeanFactoryAware
SI's BeanFactoryChannelResolver was BeanFactoryAware. This commit
brings Spring's BeanFactoryMessageChannelDestinationResolver in line
with the old SI class.
2013-07-24 16:45:52 -04:00
Rossen Stoyanchev 02949fc4a7 Fix failing tests 2013-07-21 20:39:07 -04:00
Rossen Stoyanchev b3c7c18c1b Add MessageHandler destination prefix checks 2013-07-21 12:07:50 -04:00
Rossen Stoyanchev 2cdac267f7 Add MessageMethodArumentResolver 2013-07-21 12:07:50 -04:00
Rossen Stoyanchev 90c4712d06 Revise UserSessionResolver to UserQueueSuffixResolver
The resolver for /user/{username} prefixed destinations is now
more explicitly designed to store queue suffixes rather than session
id's, which is what we happen to use as queue suffixes.

This allows something other than the sessionId to be used without
having to change many places. It also enables applications to
construct destinations with user-specific queue suffixes without
making assumptions about what's used for queue suffixes. For
example a controller may construct a map with subscription destinations
and send that down to the client.
2013-07-19 17:22:58 -04:00
Rossen Stoyanchev 3272917cf2 Polish concurrency in UserSessionResolver impl 2013-07-19 10:57:23 -04:00
Rossen Stoyanchev aa6f30482f Reverse change committed erroneously 2013-07-17 23:00:17 -04:00
Rossen Stoyanchev a109d6adc7 Set heartbeat to 0,0 on CONNECT to message broker 2013-07-17 22:40:44 -04:00
Rossen Stoyanchev 8a8501a992 Polish 2013-07-17 18:23:27 -04:00
Rossen Stoyanchev 329fbf31bc Fix concurrency issue in DefaultSubscriptionRegistry 2013-07-17 18:16:39 -04:00
Rossen Stoyanchev d73c2e26a5 Polish handling of STOMP message headers 2013-07-17 13:58:45 -04:00
Rossen Stoyanchev ba7998d03b Add SimpMessageSendingOperations 2013-07-17 10:09:55 -04:00
Rossen Stoyanchev 078cfb3e78 Add @ReplyTo/@ReplyToUser, remove deps on spring-web 2013-07-16 22:07:46 -04:00
Rossen Stoyanchev 55dae74f15 Add ReplyTo annotation 2013-07-16 10:24:45 -04:00
Rossen Stoyanchev e0d393eed3 Fix issue in STOMP broker relay 2013-07-15 17:45:54 -04:00
Rossen Stoyanchev 5d20b75dc2 Add support for sending private messages
The new UserDestinationMessageHandler resolves messages with
destinations prefixed with "/user/{username}" and resolves them into a
destination to which the user is currently subscribed by appending the
user session id.

For example a destination such as "/user/john/queue/trade-confirmation"
would resolve "/trade-confirmation/i9oqdfzo" assuming "i9oqdfzo" is the
user's session id.
2013-07-14 21:10:15 -04:00
Rossen Stoyanchev 2a48ad88fb Refactor and polish spring-messaging
Remove base class for STOMP-related message handler classes
(AbstractSimpMessageHandler), polish subclasses and fix issues with
more significant updates to STOMP broker relay.

Introduce base class for SubscribableChannel implementations providing
consistent logging for all channel implementations.
2013-07-13 19:05:32 -04:00
Rossen Stoyanchev f5f3f66b13 Add user-name header to CONNECTED frame 2013-07-12 19:42:31 -04:00
Rossen Stoyanchev bd68fefc6f Fix issue with clearing subscriptions on disconnect 2013-07-12 15:30:12 -04:00
Rossen Stoyanchev 210be9cde4 Add PrincipalMessageArgumentResolver 2013-07-12 15:15:37 -04:00
Rossen Stoyanchev d3cecfc6cc Create spring-messaging module
Consolidates new, messaging-related classes from spring-context and
spring-websocket into one module.
2013-07-12 13:44:41 -04:00