org.springframework.web.reactive.socket.server.upgrade

## Class TomcatRequestUpgradeStrategy

- java.lang.Object
- - org.springframework.web.reactive.socket.server.upgrade.TomcatRequestUpgradeStrategy

All Implemented Interfaces:
  RequestUpgradeStrategy

    public class TomcatRequestUpgradeStrategy
    extends Object
    implements RequestUpgradeStrategy

A `RequestUpgradeStrategy` for use with Tomcat.

Since:
  5.0
Author:
  Violeta Georgieva, Rossen Stoyanchev

### Constructor Summary

Constructors
Constructor and Description
`TomcatRequestUpgradeStrategy()`

### Method Summary

All Methods Instance Methods Concrete Methods
`Long` `getAsyncSendTimeout()`
`Integer` `getMaxBinaryMessageBufferSize()`
`Long` `getMaxSessionIdleTimeout()`
`Integer` `getMaxTextMessageBufferSize()`
`void` `setAsyncSendTimeout(Long timeoutInMillis)` Exposes the underlying config option on `WebSocketContainer.setAsyncSendTimeout(long)`.
`void` `setMaxBinaryMessageBufferSize(Integer bufferSize)` Exposes the underlying config option on `WebSocketContainer.setDefaultMaxBinaryMessageBufferSize(int)`.
`void` `setMaxSessionIdleTimeout(Long timeoutInMillis)` Exposes the underlying config option on `WebSocketContainer.setDefaultMaxSessionIdleTimeout(long)`.
`void` `setMaxTextMessageBufferSize(Integer bufferSize)` Exposes the underlying config option on `WebSocketContainer.setDefaultMaxTextMessageBufferSize(int)`.
`reactor.core.publisher.Mono<Void>` `upgrade(org.springframework.web.server.ServerWebExchange exchange, WebSocketHandler handler, String subProtocol, Supplier<HandshakeInfo> handshakeInfoFactory)` Upgrade to a WebSocket session and handle it with the given handler.

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

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

### Methods inherited from interface org.springframework.web.reactive.socket.server.RequestUpgradeStrategy

`upgrade`

### Constructor Detail

#### TomcatRequestUpgradeStrategy

    public TomcatRequestUpgradeStrategy()

### Method Detail

#### setAsyncSendTimeout

    public void setAsyncSendTimeout(Long timeoutInMillis)

Exposes the underlying config option on `WebSocketContainer.setAsyncSendTimeout(long)`.

#### getAsyncSendTimeout

    @Nullable
    public Long getAsyncSendTimeout()

#### setMaxSessionIdleTimeout

    public void setMaxSessionIdleTimeout(Long timeoutInMillis)

Exposes the underlying config option on `WebSocketContainer.setDefaultMaxSessionIdleTimeout(long)`.

#### getMaxSessionIdleTimeout

    @Nullable
    public Long getMaxSessionIdleTimeout()

#### setMaxTextMessageBufferSize

    public void setMaxTextMessageBufferSize(Integer bufferSize)

Exposes the underlying config option on `WebSocketContainer.setDefaultMaxTextMessageBufferSize(int)`.

#### getMaxTextMessageBufferSize

    @Nullable
    public Integer getMaxTextMessageBufferSize()

#### setMaxBinaryMessageBufferSize

    public void setMaxBinaryMessageBufferSize(Integer bufferSize)

Exposes the underlying config option on `WebSocketContainer.setDefaultMaxBinaryMessageBufferSize(int)`.

#### getMaxBinaryMessageBufferSize

    @Nullable
    public Integer getMaxBinaryMessageBufferSize()

#### upgrade

    public reactor.core.publisher.Mono<Void> upgrade(org.springframework.web.server.ServerWebExchange exchange,
                                                     WebSocketHandler handler,
                                                     @Nullable
                                                     String subProtocol,
                                                     Supplier<HandshakeInfo> handshakeInfoFactory)

Description copied from interface: `RequestUpgradeStrategy`
Upgrade to a WebSocket session and handle it with the given handler.

Specified by:
  `upgrade` in interface `RequestUpgradeStrategy`
Parameters:
  `exchange` - the current exchange
  `handler` - handler for the WebSocket session
  `subProtocol` - the selected sub-protocol got the handler
  `handshakeInfoFactory` - factory to create HandshakeInfo for the WebSocket session
Returns:
  completion `Mono<Void>` to indicate the outcome of the WebSocket session handling.