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 jakarta.
you can use ServletServerContainerFactoryBean in XML configuration or,
when using Java configuration, access the container instance through the
"jakarta.websocket.server.ServerContainer" ServletContext attribute.
jakarta.websocket.server.ServerContainer#upgradeHttpToWebSocket
| Modifier and Type | Field and Description |
|---|---|
| private static final String[] |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public String[] | getSupportedVersions()
Implements org. Return the supported WebSocket protocol versions. |
| protected void | upgradeHttpToWebSocket(HttpServletRequest request, HttpServletResponse response, ServerEndpointConfig endpointConfig, Map<String, String> pathParams)
|
| protected void | upgradeInternal(ServerHttpRequest request, ServerHttpResponse response, String selectedProtocol, List<Extension> selectedExtensions, Endpoint endpoint)
Implements abstract org.
|
| SUPPORTED_VERSIONS | back to summary |
|---|---|
| private static final String[] SUPPORTED_VERSIONS | |
| StandardWebSocketUpgradeStrategy | back to summary |
|---|---|
| public StandardWebSocketUpgradeStrategy() | |
| getSupportedVersions | back to summary |
|---|---|
| public String[] getSupportedVersions() Implements org. Doc from org. Return the supported WebSocket protocol versions.
| |
| upgradeHttpToWebSocket | back to summary |
|---|---|
| protected void upgradeHttpToWebSocket(HttpServletRequest request, HttpServletResponse response, ServerEndpointConfig endpointConfig, Map<String, String> pathParams) throws Exception | |
| upgradeInternal | back to summary |
|---|---|
| protected void upgradeInternal(ServerHttpRequest request, ServerHttpResponse response, String selectedProtocol, List<Extension> selectedExtensions, Endpoint endpoint) throws HandshakeFailureException Implements abstract org.
| |