Commit Graph

6971 Commits

Author SHA1 Message Date
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
Arjen Poutsma 14ab2c88cc Request streaming for Apache HttpClient
- Added org.springframework.http.StreamingHttpOutputMessage, which
  allows for a settable request body (as opposed to an output stream).

- Added http.client.HttpComponentsStreamingClientHttpRequest, which
  implements the above mentioned interface, mapping setBody() to a
  setEntity() call on the Apache HttpClient HttpEntityEnclosingRequest.

- Added a 'bufferRequestBody' property to the
  HttpComponentsClientHttpRequestFactory. When this property is set to
  false (default is true), we return a
  HttpComponentsStreamingClientHttpRequest instead of a (request
  buffering) HttpComponentsClientHttpRequest.

Issue: SPR-10728
2013-07-11 09:46:14 -04:00
Rossen Stoyanchev 6407caac8f Merge remote-tracking branch 'origin/master' 2013-07-11 09:20:16 -04:00
Sam Brannen a5c3c12627 Merge pull request #314 from bijukunjummen/master
* SPR-10650:
  Fix typo in ModelAndViewMethodReturnValueHandler
2013-07-11 01:33:42 +02:00
Biju Kunjummen 83ea0fb9e0 Fix typo in ModelAndViewMethodReturnValueHandler
This commit fixes a typo in the class-level Javadoc for
ModelAndViewMethodReturnValueHandler.

Issue: SPR-10650
2013-07-11 01:33:02 +02:00
Rossen Stoyanchev 2803845151 Update MessageConverter and reactor dependencies 2013-07-10 16:00:40 -04:00
Rossen Stoyanchev dbc904b647 Remove mavenLocal (was temporarily added) 2013-07-08 11:34:56 -04:00
Rossen Stoyanchev 3a2f5e71b7 Refactor SubscriptionRegistry
The SubscriptionRegistry and implementations are now in a package
together with SimpleBrokerWebMessageHandler and primarily support
with matching subscriptions to messages. Subscriptions can contain
patterns as supported by AntPathMatcher.

StopmWebSocketHandler no longer keeps track of subscriptions and simply
ignores messages without a subscription id, since it has no way of
knowing broker-specific destination semantics for patterns.
2013-07-07 14:18:58 -04:00
Sam Brannen 907e286e77 Fix typos in HandlerAdapter 2013-07-06 15:31:12 -04:00
Rossen Stoyanchev f25ccac1a1 Polish SessionSubscriptionRegistry types 2013-07-05 13:38:51 -04:00
Rossen Stoyanchev 96cb7c0616 Fix test failures 2013-07-05 12:21:45 -04:00
Rossen Stoyanchev 0c92b85c3d Rename ChannelResolver to DestinationResolver 2013-07-05 11:11:19 -04:00
Rossen Stoyanchev 9dd7f6e5fb Update MessagingOperations hieararchy 2013-07-05 10:59:04 -04:00
Rossen Stoyanchev ef823721e5 Split AbstractMessagingTemplate across send/receive 2013-07-04 11:38:21 -04:00
Rossen Stoyanchev 078c766b80 Add new MessagingOperations ifc and class hieararchy 2013-07-04 11:23:40 -04:00
Rossen Stoyanchev e1080a0763 Merge branch 'master' into websocket-stomp 2013-07-04 09:55:00 -04:00
Rossen Stoyanchev 2a559028ad Upgrade spring-websocket to Jetty 9.0.4 2013-07-04 09:51:53 -04:00
Rossen Stoyanchev 8560582c40 Add messaging.channel package 2013-07-03 20:59:17 -04:00
Phillip Webb 52d378d41f Add PublishSubscribeChannel
Add a PublishSubscribeChannel implementation of SubscribableChannel.
2013-07-03 20:44:53 -04:00
Phillip Webb 7a85827c48 Polish messaging code
Minor formatting and Javadoc changes.
2013-07-03 20:44:53 -04:00
Rossen Stoyanchev 0a68c9930f Add "simple" broker and SessionSubscriptionRegistry
SimpleBrokerWebMessageHandler can be used as an alternative to the
StompRelayWebMessageHandler.
2013-07-03 20:40:56 -04:00
Phillip Webb c0e1225591 Merge branch 'SPR-10694'
* SPR-10694:
  ConversionService JSR-356 Encoder/Decoder adapters
  Add ConversionService support for ByteBuffers
2013-07-01 13:13:41 -07:00
Phillip Webb 8d6fd1ed63 ConversionService JSR-356 Encoder/Decoder adapters
Develop support class allowing JSR-356 Encoder and Decoder interfaces
to delegate to Spring's ConversionService.

Issue: SPR-10694
2013-07-01 13:12:52 -07:00
Phillip Webb 9dba73dfc9 Add ConversionService support for ByteBuffers
Add ByteBufferConverter that is registered by default with the
DefaultConversionService. Allows conversion from/to a ByteBuffer and
byte[] or to any type that can be converted via a byte[].

Issue: SPR-10712
2013-07-01 13:12:52 -07:00
Andy Wilkinson e694cc16c7 Consider original headers in pattern-based removal
When headers are being removed based on pattern matching, both the
new header names and the original header names need to be matched
against the pattern. Previously, only new headers were being
considered resulting in any matching original headers not being
removed.
2013-07-01 12:13:17 -04:00
Andy Wilkinson 98d7073370 Verify types when setting header
When a header is being set, verify that the type that's provided is
legal for the header that's been set. For example, the error channel's
type must be a MessageChannel or a String.

The method that performs type verification is protected so that it
can be overriden by sub-classes. It is expected that an overriding
method will call the super method.
2013-07-01 12:11:12 -04:00
Phillip Webb 638ba3fa97 Revert inadvertent change to DefaultDocumentLoader
Revert changes to DefaultDocumentLoader accidentally committed in
60532cbd1e.
2013-07-01 07:08:17 -07:00
Rossen Stoyanchev 8ab5f23643 Remove PubSubMessageBuilder 2013-06-29 12:54:31 -04:00
Phillip Webb 3157b68e4a Polish MethodReference
Polish MethodReference code formatting and remove duplicate code.
2013-06-28 16:24:14 -07:00
Phillip Webb bf4563e204 Include target types in MethodReference cache
Update the cached MethodExecutor in MethodReference to include the
target type. Prevents the incorrect use of the cache when the
SpEL expression refers to a different target object.

Issue: SPR-10657
2013-06-28 15:14:57 -07:00
Rossen Stoyanchev 3e27467420 Merge remote-tracking branch 'wilkinsona/message-header-accessor' into websocket-stomp 2013-06-28 10:41:04 -04:00
Rossen Stoyanchev ea7622ed9a Fix import 2013-06-28 10:38:25 -04:00
Andy Wilkinson 465fc7638f Fix typo in MessageHeaderAccessor's class name
Remove the extra 's' from the class name
2013-06-28 13:01:52 +01:00
Andy Wilkinson e24b71e700 Shutdown Reactor env when relay handler is stopped
The Reactor Environment (that's used by the TcpClient) manages a
number of threads. To ensure that these threads are cleaned up
Environment.shutdown() must be called when the Environment is no
longer needed.
2013-06-28 11:49:28 +01:00
Rossen Stoyanchev d650e909b2 Merge branch 'master' into websocket-stomp 2013-06-27 15:58:12 -04:00
Rossen Stoyanchev 9bdc825ded Add PayloadReturnValueHandler 2013-06-27 15:47:46 -04:00
Phillip Webb 60532cbd1e Polish spring-websocket code
Minor polish to formatting and assertion messages.
2013-06-27 09:58:58 -07:00
Rossen Stoyanchev e7d9c26a7c Make STOMP message broker host and port configurable 2013-06-27 12:43:56 -04:00