Commit Graph

6895 Commits

Author SHA1 Message Date
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
Phillip Webb f75d4e13a2 Polish cache abstraction code
Polish cache abstraction code and refactor CacheAspectSupport.
2013-06-23 09:07:16 -07:00
Sam Brannen b122ca688b Add missing @since tag to SimpleKey 2013-06-22 23:57:17 +02:00
Phillip Webb f1a18d29ba SimpleKeyGenerator to replace DefaultKeyGenerator
Introduce new SimpleKeyGenerator class to supersede DefaultKeyGenerator.
Unlike DefaultKeyGenerator, no collisions will occur with the keys
generated by SimpleKeyGenerator as the full parameter values are
considered within the SimpleKey.equals(...) method.

The SimpleKeyGenerator is now the default class used when no explicit
generator is configured.

Issue: SPR-10237
2013-06-21 12:21:29 -07:00
Phillip Webb c720d82596 Use 'Integer' not 'int' in queryForObject docs
Update queryForObject calls in the JDBC reference documentation to
use 'Integer.class' rather than the unsupported 'int.class'.

Issue: SPR-10651
2013-06-20 23:51:52 -07:00
Phillip Webb 8ed8ee2dfe Skip abstract beans in getBeansWithAnnotation()
Update BeanFactory.getBeansWithAnnotation() to skip any abstract
bean definitions.

Issue: SPR-10663
2013-06-20 22:48:30 -07:00
Phillip Webb a403e8f8b8 Inject @Configuration BeanFactory before autowire
Add EnhancedConfigurationBeanPostProcessor to inject the BeanFactory
into EnhancedConfiguration classes before the
AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues method
is called.

Prior to this commit it was possible for @Autowire in a @Configuration
class to invoke an enhanced configuration class method before the
BeanFactory was injected. This is due to the fact that the
AutowiredAnnotationBeanPostProcessor was called before
AbstractAutowireCapableBeanFactory.invokeAwareMethods().

Issue: SPR-10668
2013-06-20 20:21:18 -07:00
Rossen Stoyanchev 62e23363cb Fix getters to match setters in RMHA
Issue: SPR-10519
2013-06-20 20:57:24 -04:00
Rossen Stoyanchev c6ecaacc03 Add getResult/hasResult methods to DeferredResult
Issue: SPR-10603
2013-06-20 20:57:24 -04:00
Rossen Stoyanchev 9bc4663ead Add accept(String) method to mock request builder
Issue: SPR-10390
2013-06-20 20:57:24 -04:00
Rossen Stoyanchev 4b22558a06 Add HTTP method to RequestDataValueProcessor method
Issue: SPR-10041, SPR-10652
2013-06-20 20:57:24 -04:00