Top Description Fields Constructors Methods
io.netty5.handler.codec.http2

public final Class Http2Settings

extends CharObjectHashMap<Long>
Class Inheritance
Annotations
@UnstableApi
Imports
io.netty5.util.collection.CharObjectHashMap, io.netty5.util.internal.UnstableApi

Settings for one endpoint in an HTTP/2 connection. Each of the values are optional as defined in the spec for the SETTINGS frame. Permits storage of arbitrary key/value pairs but provides helper methods for standard settings.

Field Summary

Modifier and TypeField and Description
private static final int
DEFAULT_CAPACITY

Hides io.netty5.util.collection.CharObjectHashMap.DEFAULT_CAPACITY.

Default capacity based on the number of standard settings from the HTTP/2 spec, adjusted so that adding all of the standard settings will not cause the map capacity to change.
private static final Long
private static final Long
Inherited from io.netty5.util.collection.CharObjectHashMap:
DEFAULT_LOAD_FACTOR

Constructor Summary

AccessConstructor and Description
public
public
Http2Settings(int initialCapacity, float loadFactor)

public
Http2Settings(int initialCapacity)

Method Summary

Modifier and TypeMethod and Description
public Http2Settings
copyFrom(Http2Settings settings)

Clears and then copies the given settings into this object.

public static Http2Settings
public Integer
getIntValue(char key)

A helper method that returns Long#intValue() on the return of get(char), if present.

public Long
headerTableSize()

Gets the SETTINGS_HEADER_TABLE_SIZE value.

public Http2Settings
headerTableSize(long value)

Sets the SETTINGS_HEADER_TABLE_SIZE value.

public Integer
initialWindowSize()

Gets the SETTINGS_INITIAL_WINDOW_SIZE value.

public Http2Settings
initialWindowSize(int value)

Sets the SETTINGS_INITIAL_WINDOW_SIZE value.

protected String
keyToString(char key)

Overrides io.netty5.util.collection.CharObjectHashMap.keyToString.

Helper method called by toString() in order to convert a single map key into a string.
public Long
maxConcurrentStreams()

Gets the SETTINGS_MAX_CONCURRENT_STREAMS value.

public Http2Settings
maxConcurrentStreams(long value)

Sets the SETTINGS_MAX_CONCURRENT_STREAMS value.

public Integer
maxFrameSize()

Gets the SETTINGS_MAX_FRAME_SIZE value.

public Http2Settings
maxFrameSize(int value)

Sets the SETTINGS_MAX_FRAME_SIZE value.

public Long
maxHeaderListSize()

Gets the SETTINGS_MAX_HEADER_LIST_SIZE value.

public Http2Settings
maxHeaderListSize(long value)

Sets the SETTINGS_MAX_HEADER_LIST_SIZE value.

public Boolean
pushEnabled()

Gets the SETTINGS_ENABLE_PUSH value.

public Http2Settings
pushEnabled(boolean enabled)

Sets the SETTINGS_ENABLE_PUSH value.

public Long
put(char
the key of the entry.
key
,
Long
the value of the entry.
value
)

Overrides io.netty5.util.collection.CharObjectHashMap.put.

Implements io.netty5.util.collection.CharObjectMap.put.

Adds the given setting key/value pair.
private static void
verifyStandardSetting(int key, Long value)

Inherited from io.netty5.util.collection.CharObjectHashMap:
clearcontainsKeycontainsKeycontainsValueentriesentrySetequalsgetgethashCodeisEmptykeySetputputAllremoveremovesizetoStringvalues

Field Detail

DEFAULT_CAPACITYback to summary
private static final int DEFAULT_CAPACITY

Hides io.netty5.util.collection.CharObjectHashMap.DEFAULT_CAPACITY.

Default capacity based on the number of standard settings from the HTTP/2 spec, adjusted so that adding all of the standard settings will not cause the map capacity to change.

FALSEback to summary
private static final Long FALSE
TRUEback to summary
private static final Long TRUE

Constructor Detail

Http2Settingsback to summary
public Http2Settings()
Http2Settingsback to summary
public Http2Settings(int initialCapacity, float loadFactor)
Http2Settingsback to summary
public Http2Settings(int initialCapacity)

Method Detail

copyFromback to summary
public Http2Settings copyFrom(Http2Settings settings)

Clears and then copies the given settings into this object.

defaultSettingsback to summary
public static Http2Settings defaultSettings()
getIntValueback to summary
public Integer getIntValue(char key)

A helper method that returns Long#intValue() on the return of get(char), if present. Note that if the range of the value exceeds Integer#MAX_VALUE, the get(char) method should be used instead to avoid truncation of the value.

headerTableSizeback to summary
public Long headerTableSize()

Gets the SETTINGS_HEADER_TABLE_SIZE value. If unavailable, returns null.

headerTableSizeback to summary
public Http2Settings headerTableSize(long value)

Sets the SETTINGS_HEADER_TABLE_SIZE value.

Exceptions
IllegalArgumentException:
if verification of the setting fails.
initialWindowSizeback to summary
public Integer initialWindowSize()

Gets the SETTINGS_INITIAL_WINDOW_SIZE value. If unavailable, returns null.

initialWindowSizeback to summary
public Http2Settings initialWindowSize(int value)

Sets the SETTINGS_INITIAL_WINDOW_SIZE value.

Exceptions
IllegalArgumentException:
if verification of the setting fails.
keyToStringback to summary
protected String keyToString(char key)

Overrides io.netty5.util.collection.CharObjectHashMap.keyToString.

Doc from io.netty5.util.collection.CharObjectHashMap.keyToString.

Helper method called by toString() in order to convert a single map key into a string. This is protected to allow subclasses to override the appearance of a given key.

Annotations
@Override
maxConcurrentStreamsback to summary
public Long maxConcurrentStreams()

Gets the SETTINGS_MAX_CONCURRENT_STREAMS value. If unavailable, returns null.

maxConcurrentStreamsback to summary
public Http2Settings maxConcurrentStreams(long value)

Sets the SETTINGS_MAX_CONCURRENT_STREAMS value.

Exceptions
IllegalArgumentException:
if verification of the setting fails.
maxFrameSizeback to summary
public Integer maxFrameSize()

Gets the SETTINGS_MAX_FRAME_SIZE value. If unavailable, returns null.

maxFrameSizeback to summary
public Http2Settings maxFrameSize(int value)

Sets the SETTINGS_MAX_FRAME_SIZE value.

Exceptions
IllegalArgumentException:
if verification of the setting fails.
maxHeaderListSizeback to summary
public Long maxHeaderListSize()

Gets the SETTINGS_MAX_HEADER_LIST_SIZE value. If unavailable, returns null.

maxHeaderListSizeback to summary
public Http2Settings maxHeaderListSize(long value)

Sets the SETTINGS_MAX_HEADER_LIST_SIZE value.

Exceptions
IllegalArgumentException:
if verification of the setting fails.
pushEnabledback to summary
public Boolean pushEnabled()

Gets the SETTINGS_ENABLE_PUSH value. If unavailable, returns null.

pushEnabledback to summary
public Http2Settings pushEnabled(boolean enabled)

Sets the SETTINGS_ENABLE_PUSH value.

putback to summary
public Long put(char key, Long value)

Overrides io.netty5.util.collection.CharObjectHashMap.put.

Implements io.netty5.util.collection.CharObjectMap.put.

Adds the given setting key/value pair. For standard settings defined by the HTTP/2 spec, performs validation on the values.

Parameters
key:char

Doc from io.netty5.util.collection.CharObjectMap.put.

the key of the entry.

value:Long

Doc from io.netty5.util.collection.CharObjectMap.put.

the value of the entry.

Returns:Long

Doc from io.netty5.util.collection.CharObjectMap.put.

the previous value for this key or null if there was no previous mapping.

Annotations
@Override
Exceptions
IllegalArgumentException:
if verification for a standard HTTP/2 setting fails.
verifyStandardSettingback to summary
private static void verifyStandardSetting(int key, Long value)