org.springframework.web.socket

## Class AbstractWebSocketMessage<T>

- java.lang.Object
- - org.springframework.web.socket.AbstractWebSocketMessage<T>

- All Implemented Interfaces:
    WebSocketMessage<T>
  Direct Known Subclasses:
    BinaryMessage, PingMessage, PongMessage, TextMessage

      public abstract class AbstractWebSocketMessage<T>
      extends Object
      implements 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 Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object other)`
    `T` | `getPayload()` Return the message payload, never be `null`.
    `int` | `hashCode()`
    `boolean` | `isLast()` Whether this is the last part of a message sent as a series of partial messages.
    `String` | `toString()`
    `protected abstract String` | `toStringPayload()`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface org.springframework.web.socket.WebSocketMessage

      `getPayloadLength`

- - ### Method Detail

    - #### getPayload

          public T getPayload()

      Return the message payload, never be `null`.
      Specified by:
        `getPayload` in interface `WebSocketMessage<T>`

    - #### isLast

          public boolean isLast()

      Whether this is the last part of a message sent as a series of partial messages.
      Specified by:
        `isLast` in interface `WebSocketMessage<T>`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### equals

          public boolean equals(Object other)

      Overrides:
        `equals` in class `Object`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### toStringPayload

          protected abstract String toStringPayload()