Class AbstractTyrusRequestUpgradeStrategy
java.lang.Object
org.springframework.web.socket.server.standard.AbstractStandardUpgradeStrategy
org.springframework.web.socket.server.standard.AbstractTyrusRequestUpgradeStrategy
- All Implemented Interfaces:
RequestUpgradeStrategy
- Direct Known Subclasses:
GlassFishRequestUpgradeStrategy
,WebLogicRequestUpgradeStrategy
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).
- Since:
- 4.1
- Author:
- Rossen Stoyanchev, Brian Clozel, Juergen Hoeller
- See Also:
-
Field Summary
Fields inherited from class org.springframework.web.socket.server.standard.AbstractStandardUpgradeStrategy
logger
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected List<WebSocketExtension>
getInstalledExtensions
(WebSocketContainer container) String[]
Return the supported WebSocket protocol versions.protected abstract void
handleSuccess
(HttpServletRequest request, HttpServletResponse response, org.glassfish.tyrus.spi.WebSocketEngine.UpgradeInfo upgradeInfo, org.glassfish.tyrus.core.TyrusUpgradeResponse upgradeResponse) void
upgradeInternal
(ServerHttpRequest request, ServerHttpResponse response, String selectedProtocol, List<Extension> extensions, Endpoint endpoint) Methods inherited from class org.springframework.web.socket.server.standard.AbstractStandardUpgradeStrategy
getContainer, getHttpServletRequest, getHttpServletResponse, getSupportedExtensions, upgrade
-
Constructor Details
-
AbstractTyrusRequestUpgradeStrategy
public AbstractTyrusRequestUpgradeStrategy()
-
-
Method Details
-
getSupportedVersions
Description copied from interface:RequestUpgradeStrategy
Return the supported WebSocket protocol versions. -
getInstalledExtensions
- Overrides:
getInstalledExtensions
in classAbstractStandardUpgradeStrategy
-
upgradeInternal
public void upgradeInternal(ServerHttpRequest request, ServerHttpResponse response, @Nullable String selectedProtocol, List<Extension> extensions, Endpoint endpoint) throws HandshakeFailureException - Specified by:
upgradeInternal
in classAbstractStandardUpgradeStrategy
- Throws:
HandshakeFailureException
-
handleSuccess
protected abstract void handleSuccess(HttpServletRequest request, HttpServletResponse response, org.glassfish.tyrus.spi.WebSocketEngine.UpgradeInfo upgradeInfo, org.glassfish.tyrus.core.TyrusUpgradeResponse upgradeResponse) throws IOException, ServletException - Throws:
IOException
ServletException
-