Class UndertowRequestUpgradeStrategy
- java.lang.Object
- org.springframework.web.socket.server.standard.AbstractStandardUpgradeStrategy
- org.springframework.web.socket.server.standard.UndertowRequestUpgradeStrategy
- All Implemented Interfaces:
RequestUpgradeStrategy
public class UndertowRequestUpgradeStrategy extends AbstractStandardUpgradeStrategy
A WebSocketRequestUpgradeStrategyfor WildFly and its underlying Undertow web server. Also compatible with embedded Undertow usage.Requires Undertow 1.3.5+ as of Spring Framework 5.0.
- Since:
- 4.0.1
- Author:
- Rossen Stoyanchev
Field Summary
Fields inherited from class org.springframework.web.socket.server.standard.AbstractStandardUpgradeStrategy
logger
Constructor Summary
Constructors Constructor Description UndertowRequestUpgradeStrategy()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description io.undertow.websockets.jsr.ServerWebSocketContainergetContainer(HttpServletRequest request)String[]getSupportedVersions()Return the supported WebSocket protocol versions.protected voidupgradeInternal(ServerHttpRequest request, ServerHttpResponse response, String selectedProtocol, List<Extension> selectedExtensions, Endpoint endpoint)Methods inherited from class org.springframework.web.socket.server.standard.AbstractStandardUpgradeStrategy
getHttpServletRequest, getHttpServletResponse, getInstalledExtensions, getSupportedExtensions, upgrade
Constructor Detail
UndertowRequestUpgradeStrategy
public UndertowRequestUpgradeStrategy()
Method Detail
getSupportedVersions
public String[] getSupportedVersions()
Description copied from interface:RequestUpgradeStrategyReturn the supported WebSocket protocol versions.
upgradeInternal
protected void upgradeInternal(ServerHttpRequest request, ServerHttpResponse response, @Nullable String selectedProtocol, List<Extension> selectedExtensions, Endpoint endpoint) throws HandshakeFailureException
- Specified by:
upgradeInternalin classAbstractStandardUpgradeStrategy- Throws:
HandshakeFailureException
getContainer
public io.undertow.websockets.jsr.ServerWebSocketContainer getContainer(HttpServletRequest request)
- Overrides:
getContainerin classAbstractStandardUpgradeStrategy