Class StandardWebSocketUpgradeStrategy
java.lang.Object
org.springframework.web.socket.server.standard.AbstractStandardUpgradeStrategy
org.springframework.web.socket.server.standard.StandardWebSocketUpgradeStrategy
- All Implemented Interfaces:
- RequestUpgradeStrategy
- Direct Known Subclasses:
- TomcatRequestUpgradeStrategy,- UndertowRequestUpgradeStrategy,- WebSphereRequestUpgradeStrategy
A WebSocket 
RequestUpgradeStrategy for the Jakarta WebSocket API 2.1+.
 This strategy serves as a fallback if no specific server has been detected. It can also be used with Jakarta EE 10 level servers such as Tomcat 10.1 and Undertow 2.3 directly, relying on their built-in Jakarta WebSocket 2.1 support.
To modify properties of the underlying ServerContainer
 you can use ServletServerContainerFactoryBean in XML configuration or,
 when using Java configuration, access the container instance through the
 "jakarta.websocket.server.ServerContainer" ServletContext attribute.
- Since:
- 6.0
- Author:
- Juergen Hoeller, Rossen Stoyanchev
- See Also:
- 
Field SummaryFields inherited from class org.springframework.web.socket.server.standard.AbstractStandardUpgradeStrategylogger
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionString[]Return the supported WebSocket protocol versions.protected voidupgradeHttpToWebSocket(HttpServletRequest request, HttpServletResponse response, ServerEndpointConfig endpointConfig, Map<String, String> pathParams) protected voidupgradeInternal(ServerHttpRequest request, ServerHttpResponse response, String selectedProtocol, List<Extension> selectedExtensions, Endpoint endpoint) Methods inherited from class org.springframework.web.socket.server.standard.AbstractStandardUpgradeStrategygetContainer, getHttpServletRequest, getHttpServletResponse, getInstalledExtensions, getSupportedExtensions, upgrade
- 
Constructor Details- 
StandardWebSocketUpgradeStrategypublic StandardWebSocketUpgradeStrategy()
 
- 
- 
Method Details- 
getSupportedVersionsDescription copied from interface:RequestUpgradeStrategyReturn the supported WebSocket protocol versions.
- 
upgradeInternalprotected void upgradeInternal(ServerHttpRequest request, ServerHttpResponse response, @Nullable String selectedProtocol, List<Extension> selectedExtensions, Endpoint endpoint) throws HandshakeFailureException - Specified by:
- upgradeInternalin class- AbstractStandardUpgradeStrategy
- Throws:
- HandshakeFailureException
 
- 
upgradeHttpToWebSocketprotected void upgradeHttpToWebSocket(HttpServletRequest request, HttpServletResponse response, ServerEndpointConfig endpointConfig, Map<String, String> pathParams) throws Exception- Throws:
- Exception
 
 
-