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 forRequestUpgradeStrategyimplementations 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 classAbstractTyrusRequestUpgradeStrategy.Tyrus135EndpointHelperprotected static classAbstractTyrusRequestUpgradeStrategy.Tyrus17EndpointHelperprotected static interfaceAbstractTyrusRequestUpgradeStrategy.TyrusEndpointHelperHelps 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.TyrusEndpointHelpergetEndpointHelper()protected List<WebSocketExtension>getInstalledExtensions(WebSocketContainer container)String[]getSupportedVersions()Return the supported WebSocket protocol versions.protected abstract voidhandleSuccess(HttpServletRequest request, HttpServletResponse response, org.glassfish.tyrus.spi.WebSocketEngine.UpgradeInfo upgradeInfo, org.glassfish.tyrus.core.TyrusUpgradeResponse upgradeResponse)voidupgradeInternal(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:RequestUpgradeStrategyReturn the supported WebSocket protocol versions.
getInstalledExtensions
protected List<WebSocketExtension> getInstalledExtensions(WebSocketContainer container)
- Overrides:
getInstalledExtensionsin classAbstractStandardUpgradeStrategy
upgradeInternal
public void upgradeInternal(ServerHttpRequest request, ServerHttpResponse response, String selectedProtocol, List<Extension> extensions, Endpoint endpoint) throws HandshakeFailureException
- Specified by:
upgradeInternalin 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:
IOExceptionServletException