Class WsMessageHeader

java.lang.Object
org.jdrupes.httpcodec.protocols.websocket.WsFrameHeader
org.jdrupes.httpcodec.protocols.websocket.WsMessageHeader
All Implemented Interfaces:
MessageHeader

public class WsMessageHeader extends WsFrameHeader
The Websocket message header.
  • Constructor Details

    • WsMessageHeader

      public WsMessageHeader(boolean textMode, boolean hasPayload)
      Creates a new message header.
      Parameters:
      textMode - indicates whether the data is sent as text
      hasPayload - indicates that the message has a payload
  • Method Details

    • isFinal

      public boolean isFinal()
      Description copied from interface: MessageHeader
      Returns true if this is the final message received or transmitted on a connection.
      Returns:
      the result
    • isTextMode

      public boolean isTextMode()
      Returns:
      whether the data is sent as text
    • hasPayload

      public boolean hasPayload()
      Description copied from interface: MessageHeader
      Returns true if the complete message comprises additional data in Buffers when decoded or encoded.
      Returns:
      true if payload data follows
    • toString

      public String toString()
      Overrides:
      toString in class Object