Top Fields Constructors Methods
org.eclipse.jetty.http2.parser

public Class HeaderBlockParser

extends Object
Class Inheritance
Imports
java.nio.ByteBuffer, org.eclipse.jetty.http.HttpVersion, .MetaData, org.eclipse.jetty.http2.ErrorCode, org.eclipse.jetty.http2.hpack.HpackDecoder, .HpackException, org.eclipse.jetty.io.ByteBufferPool, .RetainableByteBuffer, org.eclipse.jetty.util.BufferUtil, org.slf4j.Logger, .LoggerFactory

Field Summary

Modifier and TypeField and Description
private RetainableByteBuffer
private final ByteBufferPool
private final HeaderParser
private final HpackDecoder
private static final Logger
private final BodyParser
public static final MetaData
public static final MetaData

Constructor Summary

AccessConstructor and Description
public
HeaderBlockParser(HeaderParser headerParser, ByteBufferPool bufferPool, HpackDecoder hpackDecoder, BodyParser notifier)

Method Summary

Modifier and TypeMethod and Description
public int
public MetaData

Returns:

null, if the buffer contains less than blockLength 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.
parse
(ByteBuffer
the buffer to parse
buffer
,
int
the length of the HPACK block
blockLength
)

Parses @{code blockLength} HPACK bytes from the given buffer.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

blockBufferback to summary
private RetainableByteBuffer blockBuffer
bufferPoolback to summary
private final ByteBufferPool bufferPool
headerParserback to summary
private final HeaderParser headerParser
hpackDecoderback to summary
private final HpackDecoder hpackDecoder
LOGback to summary
private static final Logger LOG
notifierback to summary
private final BodyParser notifier
SESSION_FAILUREback to summary
public static final MetaData SESSION_FAILURE
STREAM_FAILUREback to summary
public static final MetaData STREAM_FAILURE

Constructor Detail

HeaderBlockParserback to summary
public HeaderBlockParser(HeaderParser headerParser, ByteBufferPool bufferPool, HpackDecoder hpackDecoder, BodyParser notifier)

Method Detail

getMaxHeaderListSizeback to summary
public int getMaxHeaderListSize()
parseback to summary
public MetaData parse(ByteBuffer buffer, int blockLength)

Parses @{code blockLength} HPACK bytes from the given buffer.

Parameters
buffer:ByteBuffer

the buffer to parse

blockLength:int

the length of the HPACK block

Returns:MetaData

null, if the buffer contains less than blockLength 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.