Consistent documentation references to Jakarta WebSocket (2.1)
Closes gh-29581
This commit is contained in:
parent
9c7b471634
commit
21d3a7529c
|
@ -184,7 +184,7 @@ HTTP requests. It is also easy to integrate into other HTTP processing scenarios
|
|||
by invoking `WebSocketHttpRequestHandler`. This is convenient and easy to
|
||||
understand. However, special considerations apply with regards to JSR-356 runtimes.
|
||||
|
||||
The Java WebSocket API (JSR-356) provides two deployment mechanisms. The first
|
||||
The Jakarta WebSocket API (JSR-356) provides two deployment mechanisms. The first
|
||||
involves a Servlet container classpath scan (a Servlet 3 feature) at startup.
|
||||
The other is a registration API to use at Servlet container initialization.
|
||||
Neither of these mechanism makes it possible to use a single "`front controller`"
|
||||
|
@ -193,17 +193,9 @@ requests -- such as Spring MVC's `DispatcherServlet`.
|
|||
|
||||
This is a significant limitation of JSR-356 that Spring's WebSocket support addresses with
|
||||
server-specific `RequestUpgradeStrategy` implementations even when running in a JSR-356 runtime.
|
||||
Such strategies currently exist for Tomcat, Jetty, GlassFish, WebLogic, WebSphere, and
|
||||
Undertow (and WildFly).
|
||||
|
||||
|
||||
|
||||
NOTE: A request to overcome the preceding limitation in the Java WebSocket API has been
|
||||
created and can be followed at
|
||||
https://github.com/eclipse-ee4j/websocket-api/issues/211[eclipse-ee4j/websocket-api#211].
|
||||
Tomcat, Undertow, and WebSphere provide their own API alternatives that
|
||||
make it possible to do this, and it is also possible with Jetty. We are hopeful
|
||||
that more servers will do the same.
|
||||
Such strategies currently exist for Tomcat, Jetty, GlassFish, WebLogic, WebSphere, and Undertow
|
||||
(and WildFly). As of Jakarta WebSocket 2.1, a standard request upgrade strategy is available
|
||||
which Spring chooses on Jakarta EE 10 based web containers such as Tomcat 10.1 and Jetty 12.
|
||||
|
||||
A secondary consideration is that Servlet containers with JSR-356 support are expected
|
||||
to perform a `ServletContainerInitializer` (SCI) scan that can slow down application
|
||||
|
|
|
@ -38,7 +38,7 @@ import org.springframework.util.Assert;
|
|||
*
|
||||
* <p>Specifically a base class for reading from the HTTP request body with
|
||||
* Servlet non-blocking I/O and Undertow XNIO as well as handling incoming
|
||||
* WebSocket messages with standard Java WebSocket (JSR-356), Jetty, and
|
||||
* WebSocket messages with standard Jakarta WebSocket (JSR-356), Jetty, and
|
||||
* Undertow.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2002-2021 the original author or authors.
|
||||
* Copyright 2002-2022 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -35,7 +35,7 @@ import org.springframework.util.StringUtils;
|
|||
*
|
||||
* <p>Specifically a base class for writing to the HTTP response body with
|
||||
* Servlet non-blocking I/O and Undertow XNIO as well for writing WebSocket
|
||||
* messages through the Java WebSocket API (JSR-356), Jetty, and Undertow.
|
||||
* messages through the Jakarta WebSocket API (JSR-356), Jetty, and Undertow.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
* @author Violeta Georgieva
|
||||
|
|
|
@ -42,7 +42,7 @@ import org.springframework.web.reactive.socket.WebSocketSession;
|
|||
|
||||
/**
|
||||
* Base class for {@link WebSocketSession} implementations that bridge between
|
||||
* event-listener WebSocket APIs (e.g. Java WebSocket API JSR-356, Jetty,
|
||||
* event-listener WebSocket APIs (e.g. Jakarta WebSocket API (JSR-356), Jetty,
|
||||
* Undertow) and Reactive Streams.
|
||||
*
|
||||
* <p>Also implements {@code Subscriber<Void>} so it can be used to subscribe to
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2002-2021 the original author or authors.
|
||||
* Copyright 2002-2022 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -36,8 +36,8 @@ import org.springframework.web.reactive.socket.WebSocketMessage.Type;
|
|||
import org.springframework.web.reactive.socket.WebSocketSession;
|
||||
|
||||
/**
|
||||
* Adapter for Java WebSocket API (JSR-356) that delegates events to a reactive
|
||||
* {@link WebSocketHandler} and its session.
|
||||
* Adapter for the Jakarta WebSocket API (JSR-356) that delegates events to a
|
||||
* reactive {@link WebSocketHandler} and its session.
|
||||
*
|
||||
* @author Violeta Georgieva
|
||||
* @author Rossen Stoyanchev
|
||||
|
|
|
@ -43,7 +43,7 @@ import org.springframework.web.reactive.socket.adapter.StandardWebSocketHandlerA
|
|||
import org.springframework.web.reactive.socket.adapter.StandardWebSocketSession;
|
||||
|
||||
/**
|
||||
* {@link WebSocketClient} implementation for use with the Java WebSocket API.
|
||||
* {@link WebSocketClient} implementation for use with the Jakarta WebSocket API.
|
||||
*
|
||||
* @author Violeta Georgieva
|
||||
* @author Rossen Stoyanchev
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2002-2020 the original author or authors.
|
||||
* Copyright 2002-2022 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -26,14 +26,15 @@ import org.springframework.web.reactive.socket.adapter.StandardWebSocketSession;
|
|||
import org.springframework.web.reactive.socket.adapter.TomcatWebSocketSession;
|
||||
|
||||
/**
|
||||
* {@link WebSocketClient} implementation for use with the Java WebSocket API.
|
||||
* {@link WebSocketClient} implementation for use with Tomcat,
|
||||
* based on the Jakarta WebSocket API.
|
||||
*
|
||||
* @author Violeta Georgieva
|
||||
* @since 5.0
|
||||
* @see StandardWebSocketClient
|
||||
*/
|
||||
public class TomcatWebSocketClient extends StandardWebSocketClient {
|
||||
|
||||
|
||||
public TomcatWebSocketClient() {
|
||||
this(new WsWebSocketContainer());
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2002-2021 the original author or authors.
|
||||
* Copyright 2002-2022 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -33,11 +33,12 @@ import org.springframework.web.server.ServerWebExchange;
|
|||
*
|
||||
* <p>Typically there is one such strategy for every {@link ServerHttpRequest}
|
||||
* and {@link ServerHttpResponse} type except in the case of Servlet containers
|
||||
* for which the standard Java WebSocket API JSR-356 does not define a way to
|
||||
* for which the standard Jakarta WebSocket API (JSR-356) does not define a way to
|
||||
* upgrade a request so a custom strategy is needed for every Servlet container.
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 5.0
|
||||
* @see org.springframework.web.reactive.socket.server.upgrade.StandardWebSocketUpgradeStrategy
|
||||
*/
|
||||
public interface RequestUpgradeStrategy {
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Adapter classes for the standard Java WebSocket API.
|
||||
* Adapter classes for the standard Jakarta WebSocket API.
|
||||
*/
|
||||
@NonNullApi
|
||||
@NonNullFields
|
||||
|
|
|
@ -51,7 +51,7 @@ import org.springframework.web.socket.adapter.standard.WebSocketToStandardExtens
|
|||
import org.springframework.web.socket.client.AbstractWebSocketClient;
|
||||
|
||||
/**
|
||||
* A WebSocketClient based on standard Java WebSocket API.
|
||||
* A WebSocketClient based on the standard Jakarta WebSocket API.
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 4.0
|
||||
|
@ -88,7 +88,7 @@ public class StandardWebSocketClient extends AbstractWebSocketClient {
|
|||
|
||||
|
||||
/**
|
||||
* The standard Java WebSocket API allows passing "user properties" to the
|
||||
* The standard Jakarta WebSocket API allows passing "user properties" to the
|
||||
* server via {@link ClientEndpointConfig#getUserProperties() userProperties}.
|
||||
* Use this property to configure one or more properties to be passed on
|
||||
* every handshake.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Client-side classes for use with standard Java WebSocket endpoints.
|
||||
* Client-side classes for use with standard Jakarta WebSocket endpoints.
|
||||
*/
|
||||
@NonNullApi
|
||||
@NonNullFields
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2022 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -31,6 +31,7 @@ import org.springframework.web.socket.WebSocketHandler;
|
|||
*
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 4.0
|
||||
* @see org.springframework.web.socket.server.standard.StandardWebSocketUpgradeStrategy
|
||||
*/
|
||||
public interface RequestUpgradeStrategy {
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ import org.springframework.web.context.support.WebApplicationObjectSupport;
|
|||
|
||||
/**
|
||||
* Detects beans of type {@link jakarta.websocket.server.ServerEndpointConfig} and registers
|
||||
* with the standard Java WebSocket runtime. Also detects beans annotated with
|
||||
* with the standard Jakarta WebSocket runtime. Also detects beans annotated with
|
||||
* {@link ServerEndpoint} and registers them as well. Although not required, it is likely
|
||||
* annotated endpoints should have their {@code configurator} property set to
|
||||
* {@link SpringConfigurator}.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
* Copyright 2002-2022 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -38,7 +38,7 @@ import org.springframework.web.socket.handler.BeanCreatingHandlerProvider;
|
|||
/**
|
||||
* An implementation of {@link jakarta.websocket.server.ServerEndpointConfig} for use in
|
||||
* Spring-based applications. A {@link ServerEndpointRegistration} bean is detected by
|
||||
* {@link ServerEndpointExporter} and registered with a Java WebSocket runtime at startup.
|
||||
* {@link ServerEndpointExporter} and registered with a Jakarta WebSocket runtime at startup.
|
||||
*
|
||||
* <p>Class constructors accept a singleton {@link jakarta.websocket.Endpoint} instance
|
||||
* or an Endpoint specified by type {@link Class}. When specified by type, the endpoint
|
||||
|
|
Loading…
Reference in New Issue