org.springframework.web.socket.server.standard

## 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 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:
  Project Tyrus

### Field Summary

### Fields inherited from class org.springframework.web.socket.server.standard.AbstractStandardUpgradeStrategy

`logger`

### Constructor Summary

Constructors
Constructor and Description
`AbstractTyrusRequestUpgradeStrategy()`

### Method Summary

All Methods Instance Methods Abstract Methods Concrete Methods
`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(org.springframework.http.server.ServerHttpRequest request, org.springframework.http.server.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`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### 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 class `AbstractStandardUpgradeStrategy`

#### upgradeInternal

    public void upgradeInternal(org.springframework.http.server.ServerHttpRequest request,
                                org.springframework.http.server.ServerHttpResponse response,
                                @Nullable
                                String selectedProtocol,
                                List<Extension> extensions,
                                Endpoint endpoint)
                         throws HandshakeFailureException

Specified by:
  `upgradeInternal` in class `AbstractStandardUpgradeStrategy`
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`