WebSocketSession implementations that
holds common fields and exposes accessors. Also implements the
WebSocketMessage factory methods.
| Modifier and Type | Field and Description |
|---|---|
| private final Map | |
| private final DataBufferFactory | |
| private final T | |
| private final HandshakeInfo | |
| private final String | |
| protected final Log | |
| private final String |
| Access | Constructor and Description |
|---|---|
| protected | AbstractWebSocketSession(T delegate, String id, HandshakeInfo info, DataBufferFactory bufferFactory)
Create a new WebSocket session. |
| attributes | back to summary |
|---|---|
| private final Map<String, Object> attributes | |
| bufferFactory | back to summary |
|---|---|
| private final DataBufferFactory bufferFactory | |
| delegate | back to summary |
|---|---|
| private final T delegate | |
| handshakeInfo | back to summary |
|---|---|
| private final HandshakeInfo handshakeInfo | |
| id | back to summary |
|---|---|
| private final String id | |
| logger | back to summary |
|---|---|
| protected final Log logger | |
| logPrefix | back to summary |
|---|---|
| private final String logPrefix | |
| AbstractWebSocketSession | back to summary |
|---|---|
| protected AbstractWebSocketSession(T delegate, String id, HandshakeInfo info, DataBufferFactory bufferFactory) Create a new WebSocket session. | |
| binaryMessage | back to summary |
|---|---|
| public WebSocketMessage binaryMessage(Function<DataBufferFactory, DataBuffer> payloadFactory) Implements org. Doc from org. Factory method to create a binary WebSocketMessage using the
| |
| bufferFactory | back to summary |
|---|---|
| public DataBufferFactory bufferFactory() Implements org. Doc from org. Return a
| |
| getAttributes | back to summary |
|---|---|
| public Map Implements org. Doc from org. Return the map with attributes associated with the WebSocket session. | |
| getDelegate | back to summary |
|---|---|
| protected T getDelegate() | |
| getHandshakeInfo | back to summary |
|---|---|
| public HandshakeInfo getHandshakeInfo() Implements org. Doc from org. Return information from the handshake request.
| |
| getId | back to summary |
|---|---|
| public String getId() Implements org. Doc from org. Return the id for the session.
| |
| getLogPrefix | back to summary |
|---|---|
| protected String getLogPrefix() | |
| initLogPrefix | back to summary |
|---|---|
| private static String initLogPrefix(HandshakeInfo info, String id) | |
| pingMessage | back to summary |
|---|---|
| public WebSocketMessage pingMessage(Function<DataBufferFactory, DataBuffer> payloadFactory) Implements org. Doc from org. Factory method to create a ping WebSocketMessage using the
| |
| pongMessage | back to summary |
|---|---|
| public WebSocketMessage pongMessage(Function<DataBufferFactory, DataBuffer> payloadFactory) Implements org. Doc from org. Factory method to create a pong WebSocketMessage using the
| |
| receive | back to summary |
|---|---|
| public abstract Flux Redeclares org. Doc from org. Provides access to the stream of inbound messages. This stream receives a completion or error signal when the connection
is closed. In a typical See the class-level doc of
| |
| send | back to summary |
|---|---|
| public abstract Mono Redeclares org. Doc from org. Give a source of outgoing messages, write the messages and return a
See the class-level doc of
| |
| textMessage | back to summary |
|---|---|
| public WebSocketMessage textMessage(String payload) Implements org. Doc from org. Factory method to create a text
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |