org.springframework.web.socket

## Interface WebSocketMessage<T>

- All Known Implementing Classes:
    AbstractWebSocketMessage, BinaryMessage, PingMessage, PongMessage, TextMessage

      public interface WebSocketMessage<T>

  A message that can be handled or sent on a WebSocket connection.
  Since:
    4.0
  Author:
    Rossen Stoyanchev

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `T` | `getPayload()` Returns the message payload.
    `int` | `getPayloadLength()` Return the number of bytes contained in the message.
    `boolean` | `isLast()` When partial message support is available and requested via `WebSocketHandler.supportsPartialMessages()`, this method returns `true` if the current message is the last part of the complete WebSocket message sent by the client.

- - ### Method Detail

    - #### getPayload

          T getPayload()

      Returns the message payload. This will never be `null`.

    - #### getPayloadLength

          int getPayloadLength()

      Return the number of bytes contained in the message.

    - #### isLast

          boolean isLast()

      When partial message support is available and requested via `WebSocketHandler.supportsPartialMessages()`, this method returns `true` if the current message is the last part of the complete WebSocket message sent by the client. Otherwise `false` is returned if partial message support is either not available or not enabled.