public class SettingsBodyParser extends BodyParser
Modifier and Type | Class and Description |
---|---|
private static class |
SettingsBodyParser.State |
Modifier and Type | Field and Description |
---|---|
private int |
cursor |
private int |
keys |
private int |
length |
private static Logger |
LOG |
private int |
maxKeys |
private int |
settingId |
private java.util.Map<java.lang.Integer,java.lang.Integer> |
settings |
private int |
settingValue |
private SettingsBodyParser.State |
state |
Constructor and Description |
---|
SettingsBodyParser(HeaderParser headerParser,
Parser.Listener listener) |
SettingsBodyParser(HeaderParser headerParser,
Parser.Listener listener,
int maxKeys) |
Modifier and Type | Method and Description |
---|---|
protected void |
emptyBody(java.nio.ByteBuffer buffer) |
int |
getMaxKeys() |
protected boolean |
onSetting(java.nio.ByteBuffer buffer,
java.util.Map<java.lang.Integer,java.lang.Integer> settings,
int key,
int value) |
protected boolean |
onSettings(java.nio.ByteBuffer buffer,
java.util.Map<java.lang.Integer,java.lang.Integer> settings) |
boolean |
parse(java.nio.ByteBuffer buffer)
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. |
static SettingsFrame |
parseBody(java.nio.ByteBuffer buffer) |
protected void |
reset() |
connectionFailure, getBodyLength, getStreamId, hasFlag, isEndStream, isPadding, notifyData, notifyGoAway, notifyHeaders, notifyPing, notifyPriority, notifyPushPromise, notifyReset, notifySettings, notifyWindowUpdate, streamFailure
private static final Logger LOG
private final int maxKeys
private SettingsBodyParser.State state
private int cursor
private int length
private int settingId
private int settingValue
private int keys
private java.util.Map<java.lang.Integer,java.lang.Integer> settings
public SettingsBodyParser(HeaderParser headerParser, Parser.Listener listener)
public SettingsBodyParser(HeaderParser headerParser, Parser.Listener listener, int maxKeys)
protected void reset()
public int getMaxKeys()
protected void emptyBody(java.nio.ByteBuffer buffer)
emptyBody
in class BodyParser
public boolean parse(java.nio.ByteBuffer buffer)
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.
parse
in class BodyParser
buffer
- the buffer to parseprotected boolean onSetting(java.nio.ByteBuffer buffer, java.util.Map<java.lang.Integer,java.lang.Integer> settings, int key, int value)
protected boolean onSettings(java.nio.ByteBuffer buffer, java.util.Map<java.lang.Integer,java.lang.Integer> settings)
public static SettingsFrame parseBody(java.nio.ByteBuffer buffer)