| Modifier and Type | Class and Description |
|---|---|
| pack-priv static interface | HpackDecoder.
Interface implemented by the intended recipient of the headers. |
| Modifier and Type | Field and Description |
|---|---|
| private volatile boolean | |
| private int | currentMemorySize
the current calculates memory size, as per the HPACK algorithm |
| private static final int | |
| private int | filledTableSlots
The current table size by index (aka the number of index positions that are filled up) |
| private int | firstSlotPosition
The current HEAD position of the header table. |
| private volatile int | |
| private HpackDecoder. | headerEmitter
The object that receives the headers that are emitted from this decoder |
| private volatile int | |
| private Hpack. | headerTable
The header table |
| private static final Log | |
| private int | |
| private int | |
| private int | maxMemorySizeHard
The maximum allowed memory size set by the container. |
| private int | maxMemorySizeSoft
The maximum memory size currently in use. |
| private static final StringManager |
| Access | Constructor and Description |
|---|---|
| pack-priv | |
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| private void | |
| pack-priv void | |
| private void | |
| pack-priv int | |
| pack-priv int | |
| pack-priv int | |
| pack-priv HpackDecoder. | |
| pack-priv Hpack. | |
| pack-priv int | |
| pack-priv int | Returns: the real index into the arrayThe index from the hpack index)because we use a ring buffer type construct, and don't actually shuffle items in the array, we need to figure out the real index to use. |
| private void | |
| private String | |
| private boolean | |
| pack-priv boolean | |
| pack-priv boolean | |
| pack-priv boolean | |
| private String | |
| private String | |
| private String | |
| private void | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void |
| countedCookie | back to summary |
|---|---|
| private volatile boolean countedCookie | |
| currentMemorySize | back to summary |
|---|---|
| private int currentMemorySize the current calculates memory size, as per the HPACK algorithm | |
| DEFAULT_RING_BUFFER_SIZE | back to summary |
|---|---|
| private static final int DEFAULT_RING_BUFFER_SIZE | |
| filledTableSlots | back to summary |
|---|---|
| private int filledTableSlots The current table size by index (aka the number of index positions that are filled up) | |
| firstSlotPosition | back to summary |
|---|---|
| private int firstSlotPosition The current HEAD position of the header table. We use a ring buffer type construct as it would be silly to actually shuffle the items around in the array. | |
| headerCount | back to summary |
|---|---|
| private volatile int headerCount | |
| headerEmitter | back to summary |
|---|---|
| private HpackDecoder. The object that receives the headers that are emitted from this decoder | |
| headerSize | back to summary |
|---|---|
| private volatile int headerSize | |
| headerTable | back to summary |
|---|---|
| private Hpack. The header table | |
| log | back to summary |
|---|---|
| private static final Log log | |
| maxHeaderCount | back to summary |
|---|---|
| private int maxHeaderCount | |
| maxHeaderSize | back to summary |
|---|---|
| private int maxHeaderSize | |
| maxMemorySizeHard | back to summary |
|---|---|
| private int maxMemorySizeHard The maximum allowed memory size set by the container. | |
| maxMemorySizeSoft | back to summary |
|---|---|
| private int maxMemorySizeSoft The maximum memory size currently in use. May be less than the hard limit. | |
| sm | back to summary |
|---|---|
| private static final StringManager sm | |
| HpackDecoder | back to summary |
|---|---|
| pack-priv HpackDecoder(int maxMemorySize) | |
| HpackDecoder | back to summary |
|---|---|
| pack-priv HpackDecoder() | |
| addEntryToHeaderTable | back to summary |
|---|---|
| private void addEntryToHeaderTable(Hpack. | |
| addStaticTableEntry | back to summary |
|---|---|
| private void addStaticTableEntry(int index) throws HpackException | |
| decode | back to summary |
|---|---|
| pack-priv void decode(ByteBuffer buffer) throws HpackException Decodes the provided frame data. If this method leaves data in the buffer then this buffer should be compacted so this data is preserved, unless there is no more data in which case this should be considered a protocol error.
| |
| emitHeader | back to summary |
|---|---|
| private void emitHeader(String name, String value) throws HpackException | |
| getCurrentMemorySize | back to summary |
|---|---|
| pack-priv int getCurrentMemorySize() | |
| getFilledTableSlots | back to summary |
|---|---|
| pack-priv int getFilledTableSlots() | |
| getFirstSlotPosition | back to summary |
|---|---|
| pack-priv int getFirstSlotPosition() | |
| getHeaderEmitter | back to summary |
|---|---|
| pack-priv HpackDecoder. | |
| getHeaderTable | back to summary |
|---|---|
| pack-priv Hpack. | |
| getMaxMemorySizeSoft | back to summary |
|---|---|
| pack-priv int getMaxMemorySizeSoft() | |
| getRealIndex | back to summary |
|---|---|
| pack-priv int getRealIndex(int index) throws HpackException because we use a ring buffer type construct, and don't actually shuffle items in the array, we need to figure out the real index to use. package private for unit tests
| |
| handleIndex | back to summary |
|---|---|
| private void handleIndex(int index) throws HpackException Handle an indexed header representation
| |
| handleIndexedHeaderName | back to summary |
|---|---|
| private String handleIndexedHeaderName(int index) throws HpackException | |
| handleMaxMemorySizeChange | back to summary |
|---|---|
| private boolean handleMaxMemorySizeChange(ByteBuffer buffer, int originalPos) throws HpackException | |
| isHeaderCountExceeded | back to summary |
|---|---|
| pack-priv boolean isHeaderCountExceeded() | |
| isHeaderSizeExceeded | back to summary |
|---|---|
| pack-priv boolean isHeaderSizeExceeded(int unreadSize) | |
| isHeaderSwallowSizeExceeded | back to summary |
|---|---|
| pack-priv boolean isHeaderSwallowSizeExceeded(int unreadSize) | |
| readHeaderName | back to summary |
|---|---|
| private String readHeaderName(ByteBuffer buffer, int prefixLength) throws HpackException | |
| readHpackString | back to summary |
|---|---|
| private String readHpackString(ByteBuffer buffer) throws HpackException | |
| readHuffmanString | back to summary |
|---|---|
| private String readHuffmanString(int length, ByteBuffer buffer) throws HpackException | |
| resizeIfRequired | back to summary |
|---|---|
| private void resizeIfRequired() | |
| setHeaderEmitter | back to summary |
|---|---|
| pack-priv void setHeaderEmitter(HpackDecoder. | |
| setMaxHeaderCount | back to summary |
|---|---|
| pack-priv void setMaxHeaderCount(int maxHeaderCount) | |
| setMaxHeaderSize | back to summary |
|---|---|
| pack-priv void setMaxHeaderSize(int maxHeaderSize) | |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | setHeaderException(StreamException
The exception to use when resetting the stream streamException)Inform the recipient of the headers that a stream error needs to be triggered using the given message when
|
| public void |
| emitHeader | back to summary |
|---|---|
| public void emitHeader(String name, String value) throws HpackException Pass a single header to the recipient.
| |
| setHeaderException | back to summary |
|---|---|
| public void setHeaderException(StreamException streamException) Inform the recipient of the headers that a stream error needs to be triggered using the given message when
| |
| validateHeaders | back to summary |
|---|---|
| public void validateHeaders() throws StreamException Are the headers pass to the recipient so far valid? The decoder needs to process all the headers to maintain state even if there is a problem. In addition, it is easy for the the intended recipient to track if the complete set of headers is valid since to do that state needs to be maintained between the parsing of the initial headers and the parsing of any trailer headers. The recipient is the best place to maintain that state.
| |