| Modifier and Type | Method and Description |
|---|---|
| public void | close()
Redeclares java. Close the WebSocket connection with status 1000, i.e. equivalent to: session.close(CloseStatus.NORMAL); |
| public void | |
| public String | Returns: the protocol identifier, ornull if no protocol
was specified or negotiated successfullyReturn the negotiated sub-protocol. |
| public Map | Returns: a Map with the session attributes (nevernull)Return the map with attributes associated with the WebSocket session. |
| public int | |
| public List | Returns: the list of extensions, or an empty list if no extension was specified or negotiated successfullyDetermine the negotiated extensions. |
| public HttpHeaders | |
| public String | |
| public InetSocketAddress | |
| public Principal | getPrincipal()
Return a |
| public InetSocketAddress | |
| public int | |
| public URI | |
| public boolean | |
| public void | sendMessage(WebSocketMessage<?> message)
Send a WebSocket message: either |
| public void | setBinaryMessageSizeLimit(int messageSizeLimit)
Configure the maximum size for an incoming binary message. |
| public void | setTextMessageSizeLimit(int messageSizeLimit)
Configure the maximum size for an incoming text message. |
| close | back to summary |
|---|---|
| public void close() throws IOException Redeclares java. 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 Close the WebSocket connection with the given close status. | |
| getAcceptedProtocol | back to summary |
|---|---|
| public String getAcceptedProtocol() Return the negotiated sub-protocol. | |
| getAttributes | back to summary |
|---|---|
| public Map 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() Get the configured maximum size for an incoming binary message. | |
| getExtensions | back to summary |
|---|---|
| public List Determine the negotiated extensions.
| |
| getHandshakeHeaders | back to summary |
|---|---|
| public HttpHeaders getHandshakeHeaders() Return the headers used in the handshake request (never | |
| getId | back to summary |
|---|---|
| public String getId() Return a unique session identifier. | |
| getLocalAddress | back to summary |
|---|---|
| public InetSocketAddress getLocalAddress() Return the address on which the request was received.
| |
| getPrincipal | back to summary |
|---|---|
| public Principal getPrincipal() Return a If the user has not been authenticated, the method returns
| |
| getRemoteAddress | back to summary |
|---|---|
| public InetSocketAddress getRemoteAddress() Return the address of the remote client.
| |
| getTextMessageSizeLimit | back to summary |
|---|---|
| public int getTextMessageSizeLimit() Get the configured maximum size for an incoming text message. | |
| getUri | back to summary |
|---|---|
| public URI getUri() Return the URI used to open the WebSocket connection.
| |
| isOpen | back to summary |
|---|---|
| public boolean isOpen() Whether the underlying connection is open. | |
| sendMessage | back to summary |
|---|---|
| public void sendMessage(WebSocketMessage<?> message) throws IOException 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) Configure the maximum size for an incoming binary message. | |
| setTextMessageSizeLimit | back to summary |
|---|---|
| public void setTextMessageSizeLimit(int messageSizeLimit) Configure the maximum size for an incoming text message. | |