Package org.eclipse.jetty.http3.parser
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
-
Constructor Summary
ModifierConstructorDescriptionprotected
BodyParser
(HeaderParser headerParser, ParserListener listener) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
emptyBody
(ByteBuffer buffer) protected long
protected ParserListener
protected void
notifyGoAway
(GoAwayFrame frame) protected void
notifySessionFailure
(long error, String reason, Throwable failure) protected void
notifySettings
(SettingsFrame frame) protected void
notifyStreamFailure
(long streamId, long error, Throwable failure) abstract BodyParser.Result
parse
(ByteBuffer buffer) Parses the frame body bytes in the givenbuffer
.protected void
sessionFailure
(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
-