Class BodyParser
java.lang.Object
org.eclipse.jetty.http3.parser.BodyParser
- Direct Known Subclasses:
CancelPushBodyParser, DataBodyParser, GoAwayBodyParser, HeadersBodyParser, MaxPushIdBodyParser, PushPromiseBodyParser, SettingsBodyParser, UnknownBodyParser
The base parser for the frame body of HTTP/3 frames.
Subclasses implement parse(ByteBuffer) to parse
the frame specific body.
- See Also:
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBodyParser(HeaderParser headerParser, ParserListener listener) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidemptyBody(ByteBuffer buffer) protected longprotected ParserListenerprotected voidnotifyGoAway(GoAwayFrame frame) protected voidnotifySessionFailure(long error, String reason, Throwable failure) protected voidnotifySettings(SettingsFrame frame) protected voidnotifyStreamFailure(long streamId, long error, Throwable failure) abstract BodyParser.Resultparse(ByteBuffer buffer) Parses the frame body bytes in the givenbuffer.protected voidsessionFailure(ByteBuffer buffer, long error, String reason, Throwable failure)
-
Constructor Details
-
BodyParser
-
-
Method Details
-
getParserListener
-
getBodyLength
protected long getBodyLength() -
parse
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.
- Parameters:
buffer- the buffer to parse- Returns:
- true if all the frame body bytes were parsed; false if not enough frame body bytes were present in the buffer
-
emptyBody
-
sessionFailure
-
notifySessionFailure
-
notifyStreamFailure
-
notifySettings
-
notifyGoAway
-