public class TomcatRequestUpgradeStrategy extends AbstractStandardUpgradeStrategy
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 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.
logger
Constructor and Description |
---|
TomcatRequestUpgradeStrategy() |
Modifier and Type | Method and Description |
---|---|
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) |
getHttpServletRequest, getHttpServletResponse, getInstalledExtensions, getSupportedExtensions, upgrade
public String[] getSupportedVersions()
RequestUpgradeStrategy
public void upgradeInternal(ServerHttpRequest request, ServerHttpResponse response, @Nullable String selectedProtocol, List<Extension> selectedExtensions, Endpoint endpoint) throws HandshakeFailureException
upgradeInternal
in class AbstractStandardUpgradeStrategy
HandshakeFailureException
public org.apache.tomcat.websocket.server.WsServerContainer getContainer(HttpServletRequest request)
getContainer
in class AbstractStandardUpgradeStrategy