Top Description Inners Fields Constructors Methods
org.eclipse.jetty.http3.parser

public abstract Class BodyParser

extends Object
Class Inheritance
Known Direct Subclasses
org.eclipse.jetty.http3.parser.CancelPushBodyParser, org.eclipse.jetty.http3.parser.DataBodyParser, org.eclipse.jetty.http3.parser.GoAwayBodyParser, org.eclipse.jetty.http3.parser.HeadersBodyParser, org.eclipse.jetty.http3.parser.MaxPushIdBodyParser, org.eclipse.jetty.http3.parser.PushPromiseBodyParser, org.eclipse.jetty.http3.parser.SettingsBodyParser, org.eclipse.jetty.http3.parser.UnknownBodyParser
Imports
java.io.IOException, java.nio.ByteBuffer, org.eclipse.jetty.http3.HTTP3ErrorCode, org.eclipse.jetty.http3.frames.GoAwayFrame, .SettingsFrame, org.eclipse.jetty.util.BufferUtil, org.slf4j.Logger, .LoggerFactory

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

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

See Also
MessageParser

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum

Field Summary

Modifier and TypeField and Description
private final HeaderParser
private final ParserListener
private static final Logger

Constructor Summary

AccessConstructor and Description
protected
BodyParser(HeaderParser headerParser, ParserListener listener)

Method Summary

Modifier and TypeMethod and Description
protected void
protected long
protected ParserListener
protected void
protected void
notifySessionFailure(long error, String reason, Throwable failure)

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

public abstract BodyParser.Result

Returns:

true if all the frame body bytes were parsed; false if not enough frame body bytes were present in the buffer
parse
(ByteBuffer
the buffer to parse
buffer
)

Parses the frame body bytes in the given buffer.

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

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

headerParserback to summary
private final HeaderParser headerParser
listenerback to summary
private final ParserListener listener
LOGback to summary
private static final Logger LOG

Constructor Detail

BodyParserback to summary
protected BodyParser(HeaderParser headerParser, ParserListener listener)

Method Detail

emptyBodyback to summary
protected void emptyBody(ByteBuffer buffer)
getBodyLengthback to summary
protected long getBodyLength()
getParserListenerback to summary
protected ParserListener getParserListener()
notifyGoAwayback to summary
protected void notifyGoAway(GoAwayFrame frame)
notifySessionFailureback to summary
protected void notifySessionFailure(long error, String reason, Throwable failure)
notifySettingsback to summary
protected void notifySettings(SettingsFrame frame)
notifyStreamFailureback to summary
protected void notifyStreamFailure(long streamId, long error, Throwable failure)
parseback to summary
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.

Parameters
buffer:ByteBuffer

the buffer to parse

Returns:BodyParser.Result

true if all the frame body bytes were parsed; false if not enough frame body bytes were present in the buffer

sessionFailureback to summary
protected void sessionFailure(ByteBuffer buffer, long error, String reason, Throwable failure)
org.eclipse.jetty.http3.parser back to summary

public final Enum BodyParser.Result

extends Enum<BodyParser.Result>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final BodyParser.Result
public static final BodyParser.Result
public static final BodyParser.Result
public static final BodyParser.Result

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static BodyParser.Result
public static BodyParser.Result[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

BLOCKED_FRAMEback to summary
public static final BodyParser.Result BLOCKED_FRAME
FRAGMENT_FRAMEback to summary
public static final BodyParser.Result FRAGMENT_FRAME
NO_FRAMEback to summary
public static final BodyParser.Result NO_FRAME
WHOLE_FRAMEback to summary
public static final BodyParser.Result WHOLE_FRAME

Constructor Detail

Resultback to summary
private Result()

Method Detail

valueOfback to summary
public static BodyParser.Result valueOf(String name)
valuesback to summary
public static BodyParser.Result[] values()