Package org.eclipse.jetty.http2.parser
Class SettingsBodyParser
java.lang.Object
org.eclipse.jetty.http2.parser.BodyParser
org.eclipse.jetty.http2.parser.SettingsBodyParser
-
Constructor Summary
ConstructorDescriptionSettingsBodyParser
(HeaderParser headerParser, Parser.Listener listener) SettingsBodyParser
(HeaderParser headerParser, Parser.Listener listener, int maxKeys) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
emptyBody
(ByteBuffer buffer) int
protected boolean
onSetting
(ByteBuffer buffer, Map<Integer, Integer> settings, int key, int value) protected boolean
onSettings
(ByteBuffer buffer, Map<Integer, Integer> settings) boolean
parse
(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.static SettingsFrame
parseBody
(ByteBuffer buffer) Parses the given buffer containing the whole body of aSETTINGS
frame (without header bytes), typically from theHTTP2-Settings
header.protected void
reset()
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
-
Constructor Details
-
SettingsBodyParser
-
SettingsBodyParser
-
-
Method Details
-
reset
protected void reset() -
getMaxKeys
public int getMaxKeys() -
emptyBody
- Overrides:
emptyBody
in classBodyParser
-
parse
Description copied from class:BodyParser
Parses 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:
parse
in 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
-
onSetting
-
onSettings
-
parseBody
Parses the given buffer containing the whole body of a
SETTINGS
frame (without header bytes), typically from theHTTP2-Settings
header.- Parameters:
buffer
- the buffer containing the body ofSETTINGS
frame- Returns:
- the
SETTINGS
frame from the parsed body bytes
-