Package org.eclipse.jetty.http2.hpack
Class HpackContext
- java.lang.Object
-
- org.eclipse.jetty.http2.hpack.HpackContext
-
public class HpackContext extends java.lang.Object
HPACK - Header Compression for HTTP/2This 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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
HpackContext.Entry
static class
HpackContext.StaticEntry
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_MAX_TABLE_CAPACITY
static Logger
LOG
static int
STATIC_SIZE
static java.lang.String[][]
STATIC_TABLE
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description HpackContext.Entry
add(HttpField field)
HpackContext.Entry
get(int index)
HpackContext.Entry
get(java.lang.String name)
HpackContext.Entry
get(HttpField field)
HpackContext.Entry
get(HttpHeader header)
int
getDynamicTableSize()
int
getMaxDynamicTableSize()
static HpackContext.Entry
getStatic(HttpHeader header)
int
index(HpackContext.Entry entry)
void
resize(int newMaxDynamicTableSize)
int
size()
static int
staticIndex(HttpHeader header)
java.lang.String
toString()
-
-
-
Field Detail
-
LOG
public static final Logger LOG
-
STATIC_TABLE
public static final java.lang.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:
- Constant Field Values
-
-
Method Detail
-
resize
public void resize(int newMaxDynamicTableSize)
-
get
public HpackContext.Entry get(HttpField field)
-
get
public HpackContext.Entry get(java.lang.String name)
-
get
public HpackContext.Entry get(int index)
-
get
public HpackContext.Entry get(HttpHeader header)
-
getStatic
public static HpackContext.Entry getStatic(HttpHeader header)
-
add
public HpackContext.Entry add(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(HttpHeader header)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-