Class HpackContext

java.lang.Object
org.eclipse.jetty.http2.hpack.HpackContext

public class HpackContext extends Object
HPACK - Header Compression for HTTP/2

This class maintains the compression context for a single HTTP/2 connection. Specifically it holds the static and dynamic Header Field Tables and the associated sizes and limits.

It is compliant with draft 11 of the specification

  • Field Details

    • STATIC_TABLE

      public static final String[][] STATIC_TABLE
    • STATIC_SIZE

      public static final int STATIC_SIZE
    • DEFAULT_MAX_TABLE_CAPACITY

      public static final int DEFAULT_MAX_TABLE_CAPACITY
      See Also:
    • DEFAULT_MAX_HEADER_LIST_SIZE

      public static final int DEFAULT_MAX_HEADER_LIST_SIZE
      See Also:
  • Method Details

    • resize

      public void resize(int newMaxDynamicTableSize)
    • get

      public HpackContext.Entry get(org.eclipse.jetty.http.HttpField field)
    • get

      public HpackContext.Entry get(String name)
    • get

      public HpackContext.Entry get(int index)
    • get

      public HpackContext.Entry get(org.eclipse.jetty.http.HttpHeader header)
    • getStatic

      public static HpackContext.Entry getStatic(org.eclipse.jetty.http.HttpHeader header)
    • add

      public HpackContext.Entry add(org.eclipse.jetty.http.HttpField field)
    • size

      public int size()
      Returns:
      Current dynamic table size in entries
    • getDynamicTableSize

      public int getDynamicTableSize()
      Returns:
      Current Dynamic table size in Octets
    • getMaxDynamicTableSize

      public int getMaxDynamicTableSize()
      Returns:
      Max Dynamic table size in Octets
    • index

      public int index(HpackContext.Entry entry)
    • staticIndex

      public static int staticIndex(org.eclipse.jetty.http.HttpHeader header)
    • toString

      public String toString()
      Overrides:
      toString in class Object