org.springframework.web.socket

Class PongMessage

  • All Implemented Interfaces:
    WebSocketMessage<java.nio.ByteBuffer>


    public final class PongMessage
    extends AbstractWebSocketMessage<java.nio.ByteBuffer>
    A WebSocket pong message.
    Since:
    4.0
    Author:
    Rossen Stoyanchev
    • Constructor Detail

      • PongMessage

        public PongMessage()
        Create a new pong message with an empty payload.
      • PongMessage

        public PongMessage(java.nio.ByteBuffer payload)
        Create a new pong message with the given ByteBuffer payload.
        Parameters:
        payload - the non-null payload
    • Method Detail

      • getPayloadLength

        public int getPayloadLength()
        Description copied from interface: WebSocketMessage
        Return the number of bytes contained in the message.