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

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.

Author
Rossen Stoyanchev

Since
4.0

Constructors

<init>

TomcatRequestUpgradeStrategy()

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.

Functions

getContainer

open fun getContainer(request: HttpServletRequest): WsServerContainer

getSupportedVersions

open fun getSupportedVersions(): Array<String>

upgradeInternal

open fun upgradeInternal(request: ServerHttpRequest, response: ServerHttpResponse, selectedProtocol: String, selectedExtensions: MutableList<Extension>, endpoint: Endpoint): Unit

Inherited 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