Package org.eclipse.jetty.http3.parser
Class MessageParser
java.lang.Object
org.eclipse.jetty.http3.parser.MessageParser
The HTTP/3 protocol parser.
This parser makes use of the HeaderParser
and of
BodyParser
s to parse HTTP/3 frames.
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionMessageParser
(ParserListener listener, QpackDecoder decoder, long streamId, BooleanSupplier isLast) -
Method Summary
Modifier and TypeMethodDescriptionvoid
init
(UnaryOperator<ParserListener> wrapper) boolean
parse
(ByteBuffer buffer) Parses the givenbuffer
bytes and emit events to aParserListener
.void
setDataMode
(boolean enable)
-
Constructor Details
-
MessageParser
public MessageParser(ParserListener listener, QpackDecoder decoder, long streamId, BooleanSupplier isLast)
-
-
Method Details
-
init
-
getListener
-
isDataMode
public boolean isDataMode() -
setDataMode
public void setDataMode(boolean enable) -
parse
Parses the given
buffer
bytes and emit events to aParserListener
.Only the bytes of one frame 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:
- the result of the parsing
-