Interface HttpFrame

All Known Subinterfaces:
Http2Frame, Http3Frame
All Known Implementing Classes:
Http2Frame.Data, Http2Frame.GoAway, Http2Frame.Headers, Http2Frame.Ping, Http2Frame.Priority, Http2Frame.PushPromise, Http2Frame.RstStream, Http2Frame.Settings, Http2Frame.Unknown, Http2Frame.WindowUpdate, Http3Frame.CancelPush, Http3Frame.Data, Http3Frame.GoAway, Http3Frame.Headers, Http3Frame.MaxPushId, Http3Frame.PushPromise, Http3Frame.Settings, Http3Frame.Unknown

public sealed interface HttpFrame permits Http2Frame, Http3Frame
A decoded HTTP/2 or HTTP/3 frame, as a FrameInterceptor sees it: Http2Frame or Http3Frame. Frames are records; edit one with its with... methods, which return a copy. Byte arrays are not copied: whoever creates a frame hands its arrays over.
  • Method Summary

    Modifier and Type
    Method
    Description
    The protocol the frame belongs to.
    long
    The frame type's code on the wire.
    The frame type's name as the protocol's RFC spells it (DATA, HEADERS, SETTINGS, ...), or UNKNOWN for an extension or reserved type.
  • Method Details

    • protocol

      FrameProtocol protocol()
      The protocol the frame belongs to.
      Returns:
      FrameProtocol.HTTP_2 or FrameProtocol.HTTP_3
    • typeName

      String typeName()
      The frame type's name as the protocol's RFC spells it (DATA, HEADERS, SETTINGS, ...), or UNKNOWN for an extension or reserved type.
      Returns:
      the frame type name
    • typeCode

      long typeCode()
      The frame type's code on the wire.
      Returns:
      the unsigned type code