org.springframework.web.socket.WebSocketSession instance
and delegates to it.
Also provides a getDelegate() method to return the decorated session
as well as a getLastSession() method to go through all nested delegates
and return the "last" session.
| Modifier and Type | Field and Description |
|---|---|
| private final WebSocketSession |
| Access | Constructor and Description |
|---|---|
| public |
| delegate | back to summary |
|---|---|
| private final WebSocketSession delegate | |
| WebSocketSessionDecorator | back to summary |
|---|---|
| public WebSocketSessionDecorator(WebSocketSession session) | |
| close | back to summary |
|---|---|
| public void close() throws IOException Implements org. Doc from org. Close the WebSocket connection with status 1000, i.e. equivalent to: session.close(CloseStatus.NORMAL);
| |
| close | back to summary |
|---|---|
| public void close(CloseStatus status) throws IOException Implements org. Doc from org. Close the WebSocket connection with the given close status.
| |
| getAcceptedProtocol | back to summary |
|---|---|
| public String getAcceptedProtocol() Implements org. Doc from org. Return the negotiated sub-protocol. | |
| getAttributes | back to summary |
|---|---|
| public Map Implements org. Doc from org. Return the map with attributes associated with the WebSocket session. On the server side the map can be populated initially through a
| |
| getBinaryMessageSizeLimit | back to summary |
|---|---|
| public int getBinaryMessageSizeLimit() Implements org. Doc from org. Get the configured maximum size for an incoming binary message.
| |
| getDelegate | back to summary |
|---|---|
| public WebSocketSession getDelegate() | |
| getExtensions | back to summary |
|---|---|
| public List Implements org. Doc from org. Determine the negotiated extensions.
| |
| getHandshakeHeaders | back to summary |
|---|---|
| public HttpHeaders getHandshakeHeaders() Implements org. Doc from org. Return the headers used in the handshake request (never
| |
| getId | back to summary |
|---|---|
| public String getId() Implements org. Doc from org. Return a unique session identifier.
| |
| getLastSession | back to summary |
|---|---|
| public WebSocketSession getLastSession() | |
| getLocalAddress | back to summary |
|---|---|
| public InetSocketAddress getLocalAddress() Implements org. Doc from org. Return the address on which the request was received.
| |
| getPrincipal | back to summary |
|---|---|
| public Principal getPrincipal() Implements org. Doc from org. Return a If the user has not been authenticated, the method returns
| |
| getRemoteAddress | back to summary |
|---|---|
| public InetSocketAddress getRemoteAddress() Implements org. Doc from org. Return the address of the remote client.
| |
| getTextMessageSizeLimit | back to summary |
|---|---|
| public int getTextMessageSizeLimit() Implements org. Doc from org. Get the configured maximum size for an incoming text message.
| |
| getUri | back to summary |
|---|---|
| public URI getUri() Implements org. Doc from org. Return the URI used to open the WebSocket connection. | |
| isOpen | back to summary |
|---|---|
| public boolean isOpen() Implements org. Doc from org. Whether the underlying connection is open.
| |
| sendMessage | back to summary |
|---|---|
| public void sendMessage(WebSocketMessage<?> message) throws IOException Implements org. Doc from org. Send a WebSocket message: either Note The underlying standard WebSocket session (JSR-356) does
not allow concurrent sending. Therefore, sending must be synchronized. To ensure
that, one option is to wrap the
| |
| setBinaryMessageSizeLimit | back to summary |
|---|---|
| public void setBinaryMessageSizeLimit(int messageSizeLimit) Implements org. Doc from org. Configure the maximum size for an incoming binary message.
| |
| setTextMessageSizeLimit | back to summary |
|---|---|
| public void setTextMessageSizeLimit(int messageSizeLimit) Implements org. Doc from org. Configure the maximum size for an incoming text message.
| |
| 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- | |
| unwrap | back to summary |
|---|---|
| public static WebSocketSession unwrap(WebSocketSession session) | |