public class PushPromiseBodyParser extends BodyParser
Modifier and Type | Class and Description |
---|---|
private static class |
PushPromiseBodyParser.State |
Modifier and Type | Field and Description |
---|---|
private int |
cursor |
private HeaderBlockParser |
headerBlockParser |
private int |
length |
private int |
paddingLength |
private PushPromiseBodyParser.State |
state |
private int |
streamId |
LOG
Constructor and Description |
---|
PushPromiseBodyParser(HeaderParser headerParser,
Parser.Listener listener,
HeaderBlockParser headerBlockParser) |
Modifier and Type | Method and Description |
---|---|
private void |
onPushPromise(int streamId,
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, emptyBody, getBodyLength, getStreamId, hasFlag, isEndStream, isPadding, notifyData, notifyGoAway, notifyHeaders, notifyPing, notifyPriority, notifyPushPromise, notifyReset, notifySettings, notifyWindowUpdate, streamFailure
private final HeaderBlockParser headerBlockParser
private PushPromiseBodyParser.State state
private int cursor
private int length
private int paddingLength
private int streamId
public PushPromiseBodyParser(HeaderParser headerParser, Parser.Listener listener, HeaderBlockParser headerBlockParser)
private void reset()
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 onPushPromise(int streamId, MetaData metaData)