类 TomcatRequestUpgradeStrategy
- java.lang.Object
- org.springframework.web.socket.server.standard.AbstractStandardUpgradeStrategy
- org.springframework.web.socket.server.standard.TomcatRequestUpgradeStrategy
- 所有已实现的接口:
RequestUpgradeStrategy
public class TomcatRequestUpgradeStrategy extends AbstractStandardUpgradeStrategy
A WebSocketRequestUpgradeStrategy
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
ServerContainer
you can useServletServerContainerFactoryBean
in XML configuration or, when using Java configuration, access the container instance through the "javax.websocket.server.ServerContainer" ServletContext attribute.- 从以下版本开始:
- 4.0
- 作者:
- Rossen Stoyanchev
字段概要
从类继承的字段 org.springframework.web.socket.server.standard.AbstractStandardUpgradeStrategy
logger
构造器概要
构造器 构造器 说明 TomcatRequestUpgradeStrategy()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 org.apache.tomcat.websocket.server.WsServerContainer
getContainer(HttpServletRequest request)
String[]
getSupportedVersions()
Return the supported WebSocket protocol versions.void
upgradeInternal(ServerHttpRequest request, ServerHttpResponse response, String selectedProtocol, List<Extension> selectedExtensions, Endpoint endpoint)
从类继承的方法 org.springframework.web.socket.server.standard.AbstractStandardUpgradeStrategy
getHttpServletRequest, getHttpServletResponse, getInstalledExtensions, getSupportedExtensions, upgrade
构造器详细资料
TomcatRequestUpgradeStrategy
public TomcatRequestUpgradeStrategy()
方法详细资料
getSupportedVersions
public String[] getSupportedVersions()
从接口复制的说明:RequestUpgradeStrategy
Return the supported WebSocket protocol versions.
upgradeInternal
public void upgradeInternal(ServerHttpRequest request, ServerHttpResponse response, String selectedProtocol, List<Extension> selectedExtensions, Endpoint endpoint) throws HandshakeFailureException
getContainer
public org.apache.tomcat.websocket.server.WsServerContainer getContainer(HttpServletRequest request)