public class HeadersBodyParser extends BodyParser
Modifier and Type | Class and Description |
---|---|
private static class |
HeadersBodyParser.State |
Modifier and Type | Field and Description |
---|---|
private int |
cursor |
private boolean |
exclusive |
private HeaderBlockFragments |
headerBlockFragments |
private HeaderBlockParser |
headerBlockParser |
private int |
length |
private int |
paddingLength |
private int |
parentStreamId |
private HeadersBodyParser.State |
state |
private int |
weight |
LOG
Constructor and Description |
---|
HeadersBodyParser(HeaderParser headerParser,
Parser.Listener listener,
HeaderBlockParser headerBlockParser,
HeaderBlockFragments headerBlockFragments) |
Modifier and Type | Method and Description |
---|---|
protected void |
emptyBody(java.nio.ByteBuffer buffer) |
private void |
onHeaders(int parentStreamId,
int weight,
boolean exclusive,
MetaData metaData) |
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. |
private void |
reset() |
connectionFailure, getBodyLength, getStreamId, hasFlag, isEndStream, isPadding, notifyData, notifyGoAway, notifyHeaders, notifyPing, notifyPriority, notifyPushPromise, notifyReset, notifySettings, notifyWindowUpdate, streamFailure
private final HeaderBlockParser headerBlockParser
private final HeaderBlockFragments headerBlockFragments
private HeadersBodyParser.State state
private int cursor
private int length
private int paddingLength
private boolean exclusive
private int parentStreamId
private int weight
public HeadersBodyParser(HeaderParser headerParser, Parser.Listener listener, HeaderBlockParser headerBlockParser, HeaderBlockFragments headerBlockFragments)
private void reset()
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 parseprivate void onHeaders(int parentStreamId, int weight, boolean exclusive, MetaData metaData)