From 6c58258d116d5f5c5be1b0d9676a98c417ea69c8 Mon Sep 17 00:00:00 2001 From: Sebastien Deleuze Date: Thu, 2 Jul 2015 15:38:36 +0200 Subject: [PATCH] Update AbstractSockJsService and ref doc to SockJS client 1.0.0 Issue: SPR-12422 --- .../socket/sockjs/support/AbstractSockJsService.java | 4 ++-- src/asciidoc/web-websocket.adoc | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/support/AbstractSockJsService.java b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/support/AbstractSockJsService.java index e58878fb70..62c85f014b 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/support/AbstractSockJsService.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/support/AbstractSockJsService.java @@ -81,7 +81,7 @@ public abstract class AbstractSockJsService implements SockJsService, CorsConfig private String name = "SockJSService@" + ObjectUtils.getIdentityHexString(this); - private String clientLibraryUrl = "https://cdn.jsdelivr.net/sockjs/0.3.4/sockjs.min.js"; + private String clientLibraryUrl = "https://cdn.jsdelivr.net/sockjs/1.0.0/sockjs.min.js"; private int streamBytesLimit = 128 * 1024; @@ -134,7 +134,7 @@ public abstract class AbstractSockJsService implements SockJsService, CorsConfig * server. Since the iframe needs to load the SockJS javascript client library, * this property allows specifying where to load it from. *

By default this is set to point to - * "https://cdn.jsdelivr.net/sockjs/0.3.4/sockjs.min.js". + * "https://cdn.jsdelivr.net/sockjs/1.0.0/sockjs.min.js". * However, it can also be set to point to a URL served by the application. *

Note that it's possible to specify a relative URL in which case the URL * must be relative to the iframe URL. For example assuming a SockJS endpoint diff --git a/src/asciidoc/web-websocket.adoc b/src/asciidoc/web-websocket.adoc index c7c854b6b3..c702003571 100644 --- a/src/asciidoc/web-websocket.adoc +++ b/src/asciidoc/web-websocket.adoc @@ -633,14 +633,14 @@ SockJS consists of: * The https://github.com/sockjs/sockjs-protocol[SockJS protocol] defined in the form of executable http://sockjs.github.io/sockjs-protocol/sockjs-protocol-0.3.3.html[narrated tests]. -* The https://github.com/sockjs/sockjs-client/tree/v0.3.4[SockJS JavaScript client] - a client library for use in browsers. +* The https://github.com/sockjs/sockjs-client/[SockJS JavaScript client] - a client library for use in browsers. * SockJS server implementations including one in the Spring Framework `spring-websocket` module. * As of 4.1 `spring-websocket` also provides a SockJS Java client. SockJS is designed for use in browsers. It goes to great lengths to support a wide range of browser versions using a variety of techniques. For the full list of SockJS transport types and browsers see the -https://github.com/sockjs/sockjs-client/tree/v0.3.4[SockJS client] page. Transports +https://github.com/sockjs/sockjs-client/[SockJS client] page. Transports fall in 3 general categories: WebSocket, HTTP Streaming, and HTTP Long Polling. For an overview of these categories see https://spring.io/blog/2012/05/08/spring-mvc-3-2-preview-techniques-for-real-time-updates/[this blog post]. @@ -737,10 +737,10 @@ integrate into other HTTP serving environments with the help of {javadoc-baseurl}/org/springframework/web/socket/sockjs/support/SockJsHttpRequestHandler.html[SockJsHttpRequestHandler]. On the browser side, applications can use the -https://github.com/sockjs/sockjs-client/tree/v0.3.4[sockjs-client] (version 0.3.x) that +https://github.com/sockjs/sockjs-client/[sockjs-client] (version 1.0.x) that emulates the W3C WebSocket API and communicates with the server to select the best transport option depending on the browser it's running in. Review the -https://github.com/sockjs/sockjs-client/tree/v0.3.4[sockjs-client] page and the list of +https://github.com/sockjs/sockjs-client/[sockjs-client] page and the list of transport types supported by browser. The client also provides several configuration options, for example, to specify which transports to include. @@ -822,7 +822,7 @@ similar option via the `` element: During initial development, do enable the SockJS client `devel` mode that prevents the browser from caching SockJS requests (like the iframe) that would otherwise be cached. For details on how to enable it see the -https://github.com/sockjs/sockjs-client/tree/v0.3.4[SockJS client] page. +https://github.com/sockjs/sockjs-client/[SockJS client] page. ==== [[websocket-fallback-sockjs-heartbeat]]