Class WsDefaultControlFrame

java.lang.Object
org.jdrupes.httpcodec.protocols.websocket.WsFrameHeader
org.jdrupes.httpcodec.protocols.websocket.WsDefaultControlFrame
All Implemented Interfaces:
MessageHeader
Direct Known Subclasses:
WsPingFrame, WsPongFrame

public abstract class WsDefaultControlFrame extends WsFrameHeader
Control frames with binary application data.

Note that the application data is modeled as part of the header in the API although it is handled like payload by the “wire protocol”.

  • Constructor Details

    • WsDefaultControlFrame

      public WsDefaultControlFrame(ByteBuffer applicationData)
      Creates a new frame.
      Parameters:
      applicationData - the application data. May be null.
  • 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
    • 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
    • applicationData

      Returns:
      the application data