From cf1a4b83bfdb89f3fb4633c858022b8bc8e24a1b Mon Sep 17 00:00:00 2001 From: Rob Winch Date: Thu, 15 Jan 2015 10:41:54 -0600 Subject: [PATCH] Polish WebSocket doc cleanup The callouts in the websocket guide need to be after the sample otherwise the following warning is omitted: asciidoctor: WARNING: guides/websocket.adoc: line 36: no callouts refer to list item 1 asciidoctor: WARNING: guides/websocket.adoc: line 38: no callouts refer to list item 2 asciidoctor: WARNING: websocket.adoc: line 36: no callouts refer to list item 1 asciidoctor: WARNING: websocket.adoc: line 38: no callouts refer to list item 2 This issue resolves the WARNING logs created due to the callout being placed in the wrong location. Issue #99 --- docs/src/docs/asciidoc/guides/websocket.adoc | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/docs/src/docs/asciidoc/guides/websocket.adoc b/docs/src/docs/asciidoc/guides/websocket.adoc index 66434e7d..a210df5e 100644 --- a/docs/src/docs/asciidoc/guides/websocket.adoc +++ b/docs/src/docs/asciidoc/guides/websocket.adoc @@ -32,11 +32,7 @@ For example, the configuration might look something like the following: include::{websocketdoc-test-dir}WebSocketConfig.java[tags=class] ---- -To hook in the Spring Session support we only need to change two things: - -<1> Instead of extending `AbstractWebSocketMessageBrokerConfigurer` we extend `AbstractSessionWebSocketMessageBrokerConfigurer` -<2> We rename the `registerStompEndpoints` method to `configureStompEndpoints` - +We can easily update our configuration to use Spring Session's WebSocket support. For example: .src/main/java/samples/config/WebSocketConfig.java @@ -45,7 +41,12 @@ For example: include::{samples-dir}websocket/src/main/java/sample/config/WebSocketConfig.java[tags=class] ---- -If interested in more details, here are the things the base class does: +To hook in the Spring Session support we only need to change two things: + +<1> Instead of extending `AbstractWebSocketMessageBrokerConfigurer` we extend `AbstractSessionWebSocketMessageBrokerConfigurer` +<2> We rename the `registerStompEndpoints` method to `configureStompEndpoints` + +What does `AbstractSessionWebSocketMessageBrokerConfigurer` do behind the scenes? * `WebSocketConnectHandlerDecoratorFactory` is added as a `WebSocketHandlerDecoratorFactory` to `WebSocketTransportRegistration`. This ensures a custom `SessionConnectEvent` is fired that contains the `WebSocketSession`.