Commit Graph

6905 Commits

Author SHA1 Message Date
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
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
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
Phillip Webb
2d018e5019 Polish @RequestMapping Javadoc
Issue: SPR-10587
2013-06-26 11:15:54 -07:00
Phillip Webb
38c2f253ed 'Rename' HttpHeaders.getIfNotModifiedSince()
Effectively rename HttpHeaders.getIfNotModifiedSince() to
getIfModifiedSince() by adding a new method and deprecating the
old one.

Issue: SPR-10600
2013-06-26 10:44:35 -07:00
Rossen Stoyanchev
ee9c46ad2e Remove PubSubChannelRegistry 2013-06-26 11:09:37 -04:00
Phillip Webb
6a3a361376 Include specific SQL statements in batch exception
Refine the SQL statements contained in exceptions thrown from batch
updates based on BatchUpdateException.getUpdateCounts().

Issue: SPR-10677
2013-06-25 23:14:49 -07:00
Phillip Webb
5ee6bb9b9b Fix SQL syntax error in jdbcTemplate update docs
Update the reference guide jdbcTemplate update example to include the
column name.

Issue: SPR-10625
2013-06-25 22:20:41 -07:00
Phillip Webb
2abec6fd90 Include all SQL statements in batch fail exception
Ensure any exception from calls to batchUpdate, on databases that
support batch operations, contains all the SQL statements. Prior to this
commit only the last SQL statement would be returned with the exception.

Issue: SPR-10677
2013-06-25 14:50:24 -07:00
Rossen Stoyanchev
486b4101ec Introduce MessageHeader accessor types
A new type MessageHeaderAccesssor provides read/write access to
MessageHeaders along with typed getter/setter methods along the lines
of the existing MessageBuilder methods (internally MessageBuilder
merely delegates to MessageHeaderAccessor). This class is extensible
with sub-classes expected to provide typed getter/setter methods for
specific categories of message headers.

NativeMessageHeaderAccessor is one specific sub-class that further
provides read/write access to headers from some external message
source (e.g. STOMP headers). Native headers are stored in a separate
MultiValueMap and kept under a specific key.
2013-06-25 16:31:52 -04:00
Phillip Webb
84249740b8 Merge pull request #305 from beamerblvd/SPR-10644
# By Nick Williams
* SPR-10644:
  Improving method validation support for BV 1.1
2013-06-24 13:22:35 -07:00
Nick Williams
7b2c74b05c Improving method validation support for BV 1.1
Update MethodValidationPostProcessor.setValidator(...) to use
LocalValidatorFactoryBean.getValidator() when possible.

This is required because LocalValidatorFactoryBean does not directly
implement the forExecutables() method introduced in bean validation v1.1.

Issue: SPR-10644
2013-06-24 13:21:03 -07:00
Phillip Webb
f9b12b8362 Include argument types in MethodReference cache
Update the cached MethodExecutor in MethodReference to include the
method argument types. Prevents the incorrect use of the cache when the
SpEL expression refers to a class that has overloaded methods.

Issue: SPR-10657
2013-06-24 12:28:59 -07:00
Phillip Webb
e83bdda7d5 Polish SpEL code 2013-06-24 11:22:19 -07:00
Rossen Stoyanchev
ac23832e4d Fix issue in MessageReturnValueHandler 2013-06-24 11:47:59 -04:00
Rossen Stoyanchev
32cb2ca2e7 Remove generic params from Message/MessageChannel 2013-06-24 11:14:48 -04:00
Rossen Stoyanchev
f7f66f2e5c Fix minor issue in ReactorMessageChannel 2013-06-24 09:59:27 -04:00
Phillip Webb
4830ea6065 Package RmiInvocationWrapperRTD.xml in jar
Ensure RmiInvocationWrapperRTD.xml is packaged inside spring-context.jar

Issue: SPR-10649
2013-06-23 23:49:05 -07:00
Phillip Webb
eea230f2a8 Allow @CachePut 'key' SpEL to refer to #result
Allow the @CachePut 'key' SpEL to refer to the result of the method call
via a '#result' variable.

This change is particularly useful when working with JPA entities that
have generated @Id values since the ID will often not be available
until the entity has been saved.

Issue: SPR-10664
2013-06-23 09:07:16 -07:00