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
public abstract class AbstractTyrusRequestUpgradeStrategy extends AbstractStandardUpgradeStrategy
A base class forRequestUpgradeStrategy
implementations on top of JSR-356 based servers which include Tyrus as their WebSocket engine.Works with Tyrus 1.3.5 (WebLogic 12.1.3), Tyrus 1.7 (GlassFish 4.1.0), Tyrus 1.11 (WebLogic 12.2.1), and Tyrus 1.12 (GlassFish 4.1.1).
- Since:
- 4.1
- Author:
- Rossen Stoyanchev, Brian Clozel
- See Also:
- Project Tyrus
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
AbstractTyrusRequestUpgradeStrategy.Tyrus135EndpointHelper
protected static class
AbstractTyrusRequestUpgradeStrategy.Tyrus17EndpointHelper
protected static interface
AbstractTyrusRequestUpgradeStrategy.TyrusEndpointHelper
Helps with the creation, registration, and un-registration of endpoints.
Field Summary
Fields inherited from class org.springframework.web.socket.server.standard.AbstractStandardUpgradeStrategy
logger
Constructor Summary
Constructors Constructor Description AbstractTyrusRequestUpgradeStrategy()
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract AbstractTyrusRequestUpgradeStrategy.TyrusEndpointHelper
getEndpointHelper()
protected List<WebSocketExtension>
getInstalledExtensions(WebSocketContainer container)
String[]
getSupportedVersions()
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 Detail
AbstractTyrusRequestUpgradeStrategy
public AbstractTyrusRequestUpgradeStrategy()
Method Detail
getSupportedVersions
public String[] getSupportedVersions()
Description copied from interface:RequestUpgradeStrategy
Return the supported WebSocket protocol versions.
getInstalledExtensions
protected List<WebSocketExtension> getInstalledExtensions(WebSocketContainer container)
- Overrides:
getInstalledExtensions
in classAbstractStandardUpgradeStrategy
upgradeInternal
public void upgradeInternal(ServerHttpRequest request, ServerHttpResponse response, String selectedProtocol, List<Extension> extensions, Endpoint endpoint) throws HandshakeFailureException
- Specified by:
upgradeInternal
in classAbstractStandardUpgradeStrategy
- Throws:
HandshakeFailureException
getEndpointHelper
protected abstract AbstractTyrusRequestUpgradeStrategy.TyrusEndpointHelper getEndpointHelper()
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