public class HeaderBlockParser
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private java.nio.ByteBuffer |
blockBuffer |
private ByteBufferPool |
byteBufferPool |
private HeaderParser |
headerParser |
private HpackDecoder |
hpackDecoder |
private static Logger |
LOG |
private BodyParser |
notifier |
static MetaData |
SESSION_FAILURE |
static MetaData |
STREAM_FAILURE |
Constructor and Description |
---|
HeaderBlockParser(HeaderParser headerParser,
ByteBufferPool byteBufferPool,
HpackDecoder hpackDecoder,
BodyParser notifier) |
Modifier and Type | Method and Description |
---|---|
MetaData |
parse(java.nio.ByteBuffer buffer,
int blockLength)
Parses @{code blockLength} HPACK bytes from the given
buffer . |
public static final MetaData STREAM_FAILURE
public static final MetaData SESSION_FAILURE
private static final Logger LOG
private final HeaderParser headerParser
private final ByteBufferPool byteBufferPool
private final HpackDecoder hpackDecoder
private final BodyParser notifier
private java.nio.ByteBuffer blockBuffer
public HeaderBlockParser(HeaderParser headerParser, ByteBufferPool byteBufferPool, HpackDecoder hpackDecoder, BodyParser notifier)
public MetaData parse(java.nio.ByteBuffer buffer, int blockLength)
buffer
.buffer
- the buffer to parseblockLength
- the length of the HPACK blockblockLength
bytes;
STREAM_FAILURE
if parsing the HPACK block produced a stream failure;
SESSION_FAILURE
if parsing the HPACK block produced a session failure;
a valid MetaData object if the parsing was successful.