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

public Class HpackEncoder

extends Object
Class Inheritance
Imports
java.nio.ByteBuffer, java.util.EnumMap, .EnumSet, .HashSet, .Set, org.eclipse.jetty.http.HttpField, .HttpFields, .HttpHeader, .HttpMethod, .HttpScheme, .HttpStatus, .HttpVersion, .MetaData, .PreEncodedHttpField, org.eclipse.jetty.http.compression.HuffmanEncoder, .NBitIntegerEncoder, .NBitStringEncoder, org.eclipse.jetty.http2.hpack.HpackContext.Entry, .HpackContext.StaticEntry, org.eclipse.jetty.util.BufferUtil, .StringUtil, org.slf4j.Logger, .LoggerFactory

Field Summary

Modifier and TypeField and Description
private final HpackContext
private final boolean
private int
private int
private int
private int
private boolean
private static final EnumMap<HttpMethod, PreEncodedHttpField>
private static final PreEncodedHttpField
private static final PreEncodedHttpField
pack-priv static final EnumSet<HttpHeader>
pack-priv static final EnumSet<HttpHeader>
private static final EnumSet<HttpHeader>
private static final Logger
pack-priv static final EnumSet<HttpHeader>
private static final HttpField[]
private static final PreEncodedHttpField

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
encode(ByteBuffer buffer, MetaData metadata)

public void
encode(ByteBuffer buffer, HttpField field)

public void
encodeMaxDynamicTableSize(ByteBuffer buffer, int maxTableSize)

private void
encodeName(ByteBuffer buffer, byte mask, int bits, String name, HpackContext.Entry entry)

pack-priv static void
encodeValue(ByteBuffer buffer, boolean huffman, String value)

public HpackContext
public int
public int
public int
public boolean
public void
setMaxHeaderListSize(int maxHeaderListSize)

public void
setMaxTableCapacity(int
the limit for capacity of the dynamic header table
maxTableSizeLimit
)

Sets the limit for the capacity of the dynamic header table.

public void
setTableCapacity(int
the capacity of the dynamic header table
tableCapacity
)

Sets the capacity of the dynamic header table.

public void
setValidateEncoding(boolean validateEncoding)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

_contextback to summary
private final HpackContext _context
_debugback to summary
private final boolean _debug
_headerListSizeback to summary
private int _headerListSize
_maxHeaderListSizeback to summary
private int _maxHeaderListSize
_maxTableCapacityback to summary
private int _maxTableCapacity
_tableCapacityback to summary
private int _tableCapacity
_validateEncodingback to summary
private boolean _validateEncoding
C_METHODSback to summary
private static final EnumMap<HttpMethod, PreEncodedHttpField> C_METHODS
C_SCHEME_HTTPback to summary
private static final PreEncodedHttpField C_SCHEME_HTTP
C_SCHEME_HTTPSback to summary
private static final PreEncodedHttpField C_SCHEME_HTTPS
DO_NOT_HUFFMANback to summary
pack-priv static final EnumSet<HttpHeader> DO_NOT_HUFFMAN
DO_NOT_INDEXback to summary
pack-priv static final EnumSet<HttpHeader> DO_NOT_INDEX
IGNORED_HEADERSback to summary
private static final EnumSet<HttpHeader> IGNORED_HEADERS
LOGback to summary
private static final Logger LOG
NEVER_INDEXback to summary
pack-priv static final EnumSet<HttpHeader> NEVER_INDEX
STATUSESback to summary
private static final HttpField[] STATUSES
TE_TRAILERSback to summary
private static final PreEncodedHttpField TE_TRAILERS

Constructor Detail

HpackEncoderback to summary
public HpackEncoder()

Method Detail

encodeback to summary
public void encode(ByteBuffer buffer, MetaData metadata) throws HpackException
encodeback to summary
public void encode(ByteBuffer buffer, HttpField field)
encodeMaxDynamicTableSizeback to summary
public void encodeMaxDynamicTableSize(ByteBuffer buffer, int maxTableSize)
encodeNameback to summary
private void encodeName(ByteBuffer buffer, byte mask, int bits, String name, HpackContext.Entry entry)
encodeValueback to summary
pack-priv static void encodeValue(ByteBuffer buffer, boolean huffman, String value)
getHpackContextback to summary
public HpackContext getHpackContext()
getMaxHeaderListSizeback to summary
public int getMaxHeaderListSize()
getMaxTableCapacityback to summary
public int getMaxTableCapacity()
getTableCapacityback to summary
public int getTableCapacity()
isValidateEncodingback to summary
public boolean isValidateEncoding()
setMaxHeaderListSizeback to summary
public void setMaxHeaderListSize(int maxHeaderListSize)
setMaxTableCapacityback to summary
public void setMaxTableCapacity(int maxTableSizeLimit)

Sets the limit for the capacity of the dynamic header table.

This value is set by the remote peer via the SETTINGS_HEADER_TABLE_SIZE setting.

Parameters
maxTableSizeLimit:int

the limit for capacity of the dynamic header table

setTableCapacityback to summary
public void setTableCapacity(int tableCapacity)

Sets the capacity of the dynamic header table.

The value of the capacity may be changed from 0 up to getMaxTableCapacity(). An HPACK instruction with the new capacity value will be sent to the decoder when the next call to encode(ByteBuffer, MetaData) is made.

Parameters
tableCapacity:int

the capacity of the dynamic header table

setValidateEncodingback to summary
public void setValidateEncoding(boolean validateEncoding)