Top Description Fields Constructors Methods
org.springframework.web.reactive.socket.adapter

public abstract Class NettyWebSocketSessionSupport<T>

extends AbstractWebSocketSession<T>
Class Inheritance
Known Direct Subclasses
org.springframework.web.reactive.socket.adapter.ReactorNettyWebSocketSession
Type Parameters
<T>
the native delegate type
Imports
java.util.HashMap, .Map, io.netty.buffer.ByteBuf, io.netty.handler.codec.http.websocketx.BinaryWebSocketFrame, .PingWebSocketFrame, .PongWebSocketFrame, .TextWebSocketFrame, .WebSocketFrame, org.springframework.core.io.buffer.DataBuffer, .NettyDataBufferFactory, org.springframework.util.ObjectUtils, org.springframework.web.reactive.socket.HandshakeInfo, .WebSocketMessage, .WebSocketSession

Base class for Netty-based WebSocketSession adapters that provides convenience methods to convert Netty WebSocketFrames to and from WebSocketMessages.
Author
Rossen Stoyanchev
Since
5.0

Field Summary

Modifier and TypeField and Description
public static final int
DEFAULT_FRAME_MAX_SIZE

The default max size for inbound WebSocket frames.

private static final Map<Class<?>, WebSocketMessage.Type>
Inherited from org.springframework.web.reactive.socket.adapter.AbstractWebSocketSession:
logger

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public NettyDataBufferFactory
protected WebSocketFrame
protected WebSocketMessage
Inherited from org.springframework.web.reactive.socket.adapter.AbstractWebSocketSession:
binaryMessagegetAttributesgetDelegategetHandshakeInfogetIdgetLogPrefixpingMessagepongMessagereceivesendtextMessagetoString

Field Detail

DEFAULT_FRAME_MAX_SIZEback to summary
public static final int DEFAULT_FRAME_MAX_SIZE

The default max size for inbound WebSocket frames.

messageTypesback to summary
private static final Map<Class<?>, WebSocketMessage.Type> messageTypes

Constructor Detail

NettyWebSocketSessionSupportback to summary
protected NettyWebSocketSessionSupport(T delegate, HandshakeInfo info, NettyDataBufferFactory factory)

Method Detail

bufferFactoryback to summary
public NettyDataBufferFactory bufferFactory()

Overrides org.springframework.web.reactive.socket.adapter.AbstractWebSocketSession.bufferFactory.

Implements org.springframework.web.reactive.socket.WebSocketSession.bufferFactory.

Doc from org.springframework.web.reactive.socket.WebSocketSession.bufferFactory.

Return a DataBuffer Factory to create message payloads.

Returns:NettyDataBufferFactory

the buffer factory for the session

Annotations
@Override
toFrameback to summary
protected WebSocketFrame toFrame(WebSocketMessage message)
toMessageback to summary
protected WebSocketMessage toMessage(WebSocketFrame frame)