Top Description Fields Constructors Methods
org.springframework.web.socket.server.standard

public abstract Class AbstractTyrusRequestUpgradeStrategy

extends AbstractStandardUpgradeStrategy
Class Inheritance
Known Direct Subclasses
org.springframework.web.socket.server.standard.GlassFishRequestUpgradeStrategy, org.springframework.web.socket.server.standard.WebLogicRequestUpgradeStrategy
Imports
java.io.IOException, java.lang.reflect.Constructor, .Method, java.net.URI, java.util.ArrayList, .Collections, .List, .Random, jakarta.servlet.ServletException, jakarta.servlet.http.HttpServletRequest, .HttpServletResponse, jakarta.websocket.DeploymentException, .Endpoint, .EndpointConfig, .Extension, .WebSocketContainer, org.glassfish.tyrus.core.ComponentProviderService, .RequestContext, .TyrusEndpointWrapper, .TyrusUpgradeResponse, .TyrusWebSocketEngine, .Version, org.glassfish.tyrus.server.TyrusServerContainer, org.glassfish.tyrus.spi.WebSocketEngine.UpgradeInfo, org.springframework.beans.DirectFieldAccessor, org.springframework.http.HttpHeaders, org.springframework.http.server.ServerHttpRequest, .ServerHttpResponse, org.springframework.lang.Nullable, org.springframework.util.ReflectionUtils, .StringUtils, org.springframework.web.socket.WebSocketExtension, org.springframework.web.socket.server.HandshakeFailureException

A base class for RequestUpgradeStrategy implementations on top of JSR-356 based servers which include Tyrus as their WebSocket engine.
Authors
Rossen Stoyanchev, Brian Clozel, Juergen Hoeller
Since
4.1
See Also
Project Tyrus

Field Summary

Modifier and TypeField and Description
private final ComponentProviderService
private static final Constructor<?>
private static final boolean
private static final Random
private static final Method
private static final String[]
private static final Method
Inherited from org.springframework.web.socket.server.standard.AbstractStandardUpgradeStrategy:
logger

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private Object
private RequestContext
private Object
createTyrusEndpoint(Endpoint endpoint, String endpointPath, String protocol, List<Extension> extensions, WebSocketContainer container, TyrusWebSocketEngine engine)

private static Constructor<?>
protected List<WebSocketExtension>
public String[]
protected abstract void
private void
private void
private void
public void
Inherited from org.springframework.web.socket.server.standard.AbstractStandardUpgradeStrategy:
getContainergetHttpServletRequestgetHttpServletResponsegetSupportedExtensionsupgrade

Field Detail

componentProviderback to summary
private final ComponentProviderService componentProvider
constructorback to summary
private static final Constructor<?> constructor
constructorWithBooleanArgumentback to summary
private static final boolean constructorWithBooleanArgument
randomback to summary
private static final Random random
registerMethodback to summary
private static final Method registerMethod
SUPPORTED_VERSIONSback to summary
private static final String[] SUPPORTED_VERSIONS
unRegisterMethodback to summary
private static final Method unRegisterMethod

Constructor Detail

AbstractTyrusRequestUpgradeStrategyback to summary
public AbstractTyrusRequestUpgradeStrategy()

Method Detail

createEndpointback to summary
private Object createEndpoint(ServerEndpointRegistration registration, ComponentProviderService provider, WebSocketContainer container, TyrusWebSocketEngine engine) throws DeploymentException
createRequestContextback to summary
private RequestContext createRequestContext(HttpServletRequest request, String endpointPath, HttpHeaders headers)
createTyrusEndpointback to summary
private Object createTyrusEndpoint(Endpoint endpoint, String endpointPath, String protocol, List<Extension> extensions, WebSocketContainer container, TyrusWebSocketEngine engine) throws DeploymentException
getEndpointConstructorback to summary
private static Constructor<?> getEndpointConstructor()
getInstalledExtensionsback to summary
protected List<WebSocketExtension> getInstalledExtensions(WebSocketContainer container)

Overrides org.springframework.web.socket.server.standard.AbstractStandardUpgradeStrategy.getInstalledExtensions.

Annotations
@Override
getSupportedVersionsback to summary
public String[] getSupportedVersions()

Implements org.springframework.web.socket.server.RequestUpgradeStrategy.getSupportedVersions.

Doc from org.springframework.web.socket.server.RequestUpgradeStrategy.getSupportedVersions.

Return the supported WebSocket protocol versions.

Annotations
@Override
handleSuccessback to summary
protected abstract void handleSuccess(HttpServletRequest request, HttpServletResponse response, WebSocketEngine.UpgradeInfo upgradeInfo, TyrusUpgradeResponse upgradeResponse) throws IOException, ServletException
registerback to summary
private void register(TyrusWebSocketEngine engine, Object endpoint)
unregisterback to summary
private void unregister(TyrusWebSocketEngine engine, Object endpoint)
unregisterTyrusEndpointback to summary
private void unregisterTyrusEndpoint(TyrusWebSocketEngine engine, Object tyrusEndpoint)
upgradeInternalback to summary
public void upgradeInternal(ServerHttpRequest request, ServerHttpResponse response, String selectedProtocol, List<Extension> extensions, Endpoint endpoint) throws HandshakeFailureException

Implements abstract org.springframework.web.socket.server.standard.AbstractStandardUpgradeStrategy.upgradeInternal.

Annotations
@Override