Class BodyParser

Direct Known Subclasses:
CancelPushBodyParser, DataBodyParser, GoAwayBodyParser, HeadersBodyParser, MaxPushIdBodyParser, PushPromiseBodyParser, SettingsBodyParser, UnknownBodyParser

public abstract class BodyParser extends Object

The base parser for the frame body of HTTP/3 frames.

Subclasses implement parse(ByteBuffer) to parse the frame specific body.

See Also:
  • Constructor Details

  • Method Details

    • getParserListener

      protected ParserListener getParserListener()
    • getBodyLength

      protected long getBodyLength()
    • parse

      public abstract BodyParser.Result parse(ByteBuffer buffer)

      Parses the frame body bytes in the given buffer.

      Only the frame body bytes are consumed, therefore when this method returns, the buffer may contain unconsumed bytes, for example for other frames.

      buffer - the buffer to parse
      true if all the frame body bytes were parsed; false if not enough frame body bytes were present in the buffer
    • emptyBody

      protected void emptyBody(ByteBuffer buffer)
    • sessionFailure

      protected void sessionFailure(ByteBuffer buffer, long error, String reason, Throwable failure)
    • notifySessionFailure

      protected void notifySessionFailure(long error, String reason, Throwable failure)
    • notifyStreamFailure

      protected void notifyStreamFailure(long streamId, long error, Throwable failure)
    • notifySettings

      protected void notifySettings(SettingsFrame frame)
    • notifyGoAway

      protected void notifyGoAway(GoAwayFrame frame)