spring-framework / org.springframework.web.socket.server.standard / AbstractStandardUpgradeStrategy

AbstractStandardUpgradeStrategy

abstract class AbstractStandardUpgradeStrategy : RequestUpgradeStrategy

A base class for RequestUpgradeStrategy implementations that build on the standard WebSocket API for Java (JSR-356).

Author
Rossen Stoyanchev

Since
4.0

Constructors

<init>

AbstractStandardUpgradeStrategy()

A base class for RequestUpgradeStrategy implementations that build on the standard WebSocket API for Java (JSR-356).

Functions

getSupportedExtensions

open fun getSupportedExtensions(request: ServerHttpRequest): MutableList<WebSocketExtension>

upgrade

open fun upgrade(request: ServerHttpRequest, response: ServerHttpResponse, selectedProtocol: String, selectedExtensions: MutableList<WebSocketExtension>, user: Principal, wsHandler: WebSocketHandler, attrs: MutableMap<String, Any>): Unit

Inheritors

AbstractTyrusRequestUpgradeStrategy

abstract class AbstractTyrusRequestUpgradeStrategy : AbstractStandardUpgradeStrategy

A base class for RequestUpgradeStrategy implementations on top of JSR-356 based servers which include Tyrus as their WebSocket engine.

Works with Tyrus 1.11 (WebLogic 12.2.1) and Tyrus 1.12 (GlassFish 4.1.1).

TomcatRequestUpgradeStrategy

open class TomcatRequestUpgradeStrategy : AbstractStandardUpgradeStrategy

A WebSocket RequestUpgradeStrategy for Apache Tomcat. Compatible with all versions of Tomcat that support JSR-356, i.e. Tomcat 7.0.47+ and higher.

To modify properties of the underlying javax.websocket.server.ServerContainer you can use ServletServerContainerFactoryBean in XML configuration or, when using Java configuration, access the container instance through the "javax.websocket.server.ServerContainer" ServletContext attribute.

UndertowRequestUpgradeStrategy

open class UndertowRequestUpgradeStrategy : AbstractStandardUpgradeStrategy

A WebSocket RequestUpgradeStrategy for WildFly and its underlying Undertow web server. Also compatible with embedded Undertow usage.

Requires Undertow 1.3.5+ as of Spring Framework 5.0.

WebSphereRequestUpgradeStrategy

open class WebSphereRequestUpgradeStrategy : AbstractStandardUpgradeStrategy

WebSphere support for upgrading an HttpServletRequest during a WebSocket handshake. To modify properties of the underlying javax.websocket.server.ServerContainer you can use ServletServerContainerFactoryBean in XML configuration or, when using Java configuration, access the container instance through the "javax.websocket.server.ServerContainer" ServletContext attribute.

Tested with WAS Liberty beta (August 2015) for the upcoming 8.5.5.7 release.