This commit adds an XML namespace equivalent of @EnableWebSocket and
@EnableWebSocketMessageBroker. Those are <websocket:handlers> and
<websocket:message-broker> respectively.
Examples can be found in the test suite.
This commit also alters the way MessageHandler's subscribe to their
respective MessageChannel's of interest. Rather than performing the
subscriptions in configuration code, the message channels are now
passed into MessageHandler's so they can subscribe themselves on
startup.
Issue: SPR-11063
Fix remaining Java compiler warnings, mainly around missing
generics or deprecated code.
Also add the `-Werror` compiler option to ensure that any future
warnings will fail the build.
Issue: SPR-11064
Before this change spring-messaging contained a few WebSocket-related
classes including WebSocket sub-protocol support for STOMP as well
as @EnableWebSocketMessageBroker and related configuration classes.
After this change those classes are located in the spring-websocket
module under org.springframework.web.socket.messaging.
This means the following classes in application configuration must
have their packages updated:
org.springframework.web.socket.messaging.config.EnableWebSocketMessageBroker
org.springframework.web.socket.messaging.config.StompEndpointRegistry
org.springframework.web.socket.messaging.config.WebSocketMessageBrokerConfigurer
MessageBrokerConfigurer has been renamed to MessageBrokerRegistry and
is also located in the above package.
As of Gradle 1.8, ‘testReport true’ is deprecated. Thus in order to
generate TestNG reports alongside JUnit reports with Gradle 2.0 and
beyond, we are now using:
getReports().getHtml().setEnabled(true)
Generate docbook xml from the asciidoc reference guide and use the
docbook-reference-plugin to generate HTML (single and multi-page) and
PDF documentation.
Issue: SPR-11096
- add WebSocketHttpHeaders
- client-side support for WebSocket extensions
- DefaultHandshakeHandler updates
- replace use of ServletAttributes in JettyRequestUpgradeStratey
- upgrade spring-web to jetty 9.0.5
The key contract is MvcUrls. An instance is automatically created with
the Spring MVC namespace and the MVC Java config but can also be easily
created in any configuration.
Some example tests can be found in DefaultMvcUrlsTests.
Issue: SPR-10665, SPR-8826
MvcUriComponentsBuilder allows creating URIs that point to Spring MVC
controller methods annotated with @RequestMapping. It builds them by
exposing a mock method invocation API similar to Mockito, records the
method invocations and thus builds up the URI by inspecting the mapping
annotations and the parameters handed into the method invocations.
Introduced a new SPI UriComponentsContributor that should be implemented
by HandlerMethodArgumentResolvers that actually contribute path segments
or query parameters to a URI. While the newly introduced
MvcUriComponentsBuilder looks up those UriComponentsContributor instances
from the MVC configuration.
The MvcUriComponentsBuilderFactory (name to be discussed - MvcUris maybe?)
prevents the multiple lookups by keeping the UriComponentsBuilder
instances in an instance variable. So an instance of the factory could
be exposed as Spring bean or through a HandlerMethodArgumentResolver to
be injected into Controller methods.
Issue: SPR-10665, SPR-8826
This version fixed bugs and improved performance.
New features: "select multiple attributes" and
"Array operations and slicing improved" (a new example
has been added in tests to reflect that).
See https://github.com/jayway/JsonPath/blob/master/README
Issue: SPR-10990
This change upgrades reactor to 1.0 RC1 and also removes the
reactor-based message channel in favor of the one available from
org.projectreactor:reactor-spring.
Unfortunately, the JCache API changed quite a bit since 0.6. We're building against a snapshot of JCache 0.11 now, tracking its way to final after the Public Review Ballot.
Previously, the STOMP broker relay did not support heart-beats. It sent
0,0 in the heart-beats header for its own CONNECTED message, and set the
heart-beats header to 0,0 when it was forwarding a CONNECTED from from a
client to the broker.
The broker relay now supports heart-beats for the system relay session.
It will send heart-beats at the send interval that's been negotiated
with the broker and will also expect to receive heart-beats at the
receive interval that's been negotiated with the broker. The receive
interval is multiplied by a factor of three to satisfy the STOMP spec's
suggestion of lenience and ActiveMQ 5.8.0's heart-beat behaviour (see
AMQ-4710).
The broker relay also supports heart-beats between clients and the
broker. For any given client's relay session, any heart-beats received
from the client are forwarded on to the broker and any heart-beats
received from the broker are sent back to the client.
Internally, a heart-beat is represented as a Message with a byte array
payload containing the single byte of new line ('\n') character and
'empty' headers. SubscriptionMethodReturnValueHandler has been updated
to default the message type to SimpMessageType.MESSAGE. This eases
the distinction between a heartbeat and a message that's been created
from a return value from application code.