Package org.eclipse.jetty.http2.parser
Class SettingsBodyParser
java.lang.Object
org.eclipse.jetty.http2.parser.BodyParser
org.eclipse.jetty.http2.parser.SettingsBodyParser
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSettingsBodyParser(HeaderParser headerParser, Parser.Listener listener) SettingsBodyParser(HeaderParser headerParser, Parser.Listener listener, int maxKeys) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidemptyBody(ByteBuffer buffer) intprotected booleanonSetting(ByteBuffer buffer, Map<Integer, Integer> settings, int key, int value) protected booleanonSettings(ByteBuffer buffer, Map<Integer, Integer> settings) private booleanonSettings(ByteBuffer buffer, SettingsFrame frame) booleanparse(ByteBuffer buffer) Parses the body bytes in the givenbuffer; only the body bytes are consumed, therefore when this method returns, the buffer may contain unconsumed bytes.private booleanparse(ByteBuffer buffer, int streamId, int bodyLength) static SettingsFrameparseBody(ByteBuffer buffer) Parses the given buffer containing the whole body of aSETTINGSframe (without header bytes), typically from theHTTP2-Settingsheader.protected voidreset()private booleanvalidateFrame(ByteBuffer buffer, int streamId, int bodyLength) Methods inherited from class org.eclipse.jetty.http2.parser.BodyParser
connectionFailure, getBodyLength, getFrameType, getStreamId, hasFlag, isEndStream, isPadding, notifyData, notifyGoAway, notifyHeaders, notifyPing, notifyPriority, notifyPushPromise, notifyReset, notifySettings, notifyWindowUpdate, rateControlOnEvent, streamFailure
-
Field Details
-
LOG
private static final org.eclipse.jetty.util.log.Logger LOG -
maxKeys
private final int maxKeys -
state
-
cursor
private int cursor -
length
private int length -
settingId
private int settingId -
settingValue
private int settingValue -
keys
private int keys -
settings
-
-
Constructor Details
-
SettingsBodyParser
-
SettingsBodyParser
-
-
Method Details
-
reset
protected void reset() -
getMaxKeys
public int getMaxKeys() -
emptyBody
- Overrides:
emptyBodyin classBodyParser
-
validateFrame
-
parse
Description copied from class:BodyParserParses the body bytes in the given
buffer; only the body bytes are consumed, therefore when this method returns, the buffer may contain unconsumed bytes.- Specified by:
parsein classBodyParser- Parameters:
buffer- the buffer to parse- Returns:
- true if the whole body bytes were parsed, false if not enough body bytes were present in the buffer
-
parse
-
onSetting
-
onSettings
-
onSettings
-
parseBody
Parses the given buffer containing the whole body of a
SETTINGSframe (without header bytes), typically from theHTTP2-Settingsheader.- Parameters:
buffer- the buffer containing the body ofSETTINGSframe- Returns:
- the
SETTINGSframe from the parsed body bytes
-