Class Http2Settings
- All Implemented Interfaces:
CharObjectMap<Long>, Map<Character, Long>
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.
-
Nested Class Summary
Nested classes/interfaces inherited from interface CharObjectMap
CharObjectMap.PrimitiveEntry<V> -
Field Summary
Fields inherited from class CharObjectHashMap
DEFAULT_LOAD_FACTOR -
Constructor Summary
ConstructorsConstructorDescriptionHttp2Settings(int initialCapacity) Http2Settings(int initialCapacity, float loadFactor) -
Method Summary
Modifier and TypeMethodDescriptionGets theSETTINGS_ENABLE_CONNECT_PROTOCOLvalue.connectProtocolEnabled(boolean enabled) Sets theSETTINGS_ENABLE_CONNECT_PROTOCOLvalue.copyFrom(Http2Settings settings) Clears and then copies the given settings into this object.static Http2SettingsgetIntValue(char key) A helper method that returnsLong.intValue()on the return ofCharObjectHashMap.get(char), if present.Gets theSETTINGS_HEADER_TABLE_SIZEvalue.headerTableSize(long value) Sets theSETTINGS_HEADER_TABLE_SIZEvalue.Gets theSETTINGS_INITIAL_WINDOW_SIZEvalue.initialWindowSize(int value) Sets theSETTINGS_INITIAL_WINDOW_SIZEvalue.protected StringkeyToString(char key) Helper method called byCharObjectHashMap.toString()in order to convert a single map key into a string.Gets theSETTINGS_MAX_CONCURRENT_STREAMSvalue.maxConcurrentStreams(long value) Sets theSETTINGS_MAX_CONCURRENT_STREAMSvalue.Gets theSETTINGS_MAX_FRAME_SIZEvalue.maxFrameSize(int value) Sets theSETTINGS_MAX_FRAME_SIZEvalue.Gets theSETTINGS_MAX_HEADER_LIST_SIZEvalue.maxHeaderListSize(long value) Sets theSETTINGS_MAX_HEADER_LIST_SIZEvalue.Gets theSETTINGS_ENABLE_PUSHvalue.pushEnabled(boolean enabled) Sets theSETTINGS_ENABLE_PUSHvalue.Adds the given setting key/value pair.Methods inherited from class CharObjectHashMap
clear, containsKey, containsKey, containsValue, entries, entrySet, equals, get, get, hashCode, isEmpty, keySet, put, putAll, remove, remove, size, toString, valuesMethods inherited from interface Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
Http2Settings
public Http2Settings() -
Http2Settings
public Http2Settings(int initialCapacity, float loadFactor) -
Http2Settings
public Http2Settings(int initialCapacity)
-
-
Method Details
-
put
Adds the given setting key/value pair. For standard settings defined by the HTTP/2 spec, performs validation on the values.- Specified by:
putin interfaceCharObjectMap<Long>- Overrides:
putin classCharObjectHashMap<Long>- Parameters:
key- the key of the entry.value- the value of the entry.- Returns:
- the previous value for this key or
nullif there was no previous mapping. - Throws:
IllegalArgumentException- if verification for a standard HTTP/2 setting fails.
-
headerTableSize
Gets theSETTINGS_HEADER_TABLE_SIZEvalue. If unavailable, returnsnull. -
headerTableSize
Sets theSETTINGS_HEADER_TABLE_SIZEvalue.- Throws:
IllegalArgumentException- if verification of the setting fails.
-
pushEnabled
Gets theSETTINGS_ENABLE_PUSHvalue. If unavailable, returnsnull. -
pushEnabled
Sets theSETTINGS_ENABLE_PUSHvalue. -
maxConcurrentStreams
Gets theSETTINGS_MAX_CONCURRENT_STREAMSvalue. If unavailable, returnsnull. -
maxConcurrentStreams
Sets theSETTINGS_MAX_CONCURRENT_STREAMSvalue.- Throws:
IllegalArgumentException- if verification of the setting fails.
-
initialWindowSize
Gets theSETTINGS_INITIAL_WINDOW_SIZEvalue. If unavailable, returnsnull. -
initialWindowSize
Sets theSETTINGS_INITIAL_WINDOW_SIZEvalue.- Throws:
IllegalArgumentException- if verification of the setting fails.
-
maxFrameSize
Gets theSETTINGS_MAX_FRAME_SIZEvalue. If unavailable, returnsnull. -
maxFrameSize
Sets theSETTINGS_MAX_FRAME_SIZEvalue.- Throws:
IllegalArgumentException- if verification of the setting fails.
-
maxHeaderListSize
Gets theSETTINGS_MAX_HEADER_LIST_SIZEvalue. If unavailable, returnsnull. -
maxHeaderListSize
Sets theSETTINGS_MAX_HEADER_LIST_SIZEvalue.- Throws:
IllegalArgumentException- if verification of the setting fails.
-
connectProtocolEnabled
Gets theSETTINGS_ENABLE_CONNECT_PROTOCOLvalue. If unavailable, returnsnull. -
connectProtocolEnabled
Sets theSETTINGS_ENABLE_CONNECT_PROTOCOLvalue. -
copyFrom
Clears and then copies the given settings into this object. -
getIntValue
A helper method that returnsLong.intValue()on the return ofCharObjectHashMap.get(char), if present. Note that if the range of the value exceedsInteger.MAX_VALUE, theCharObjectHashMap.get(char)method should be used instead to avoid truncation of the value. -
keyToString
Description copied from class:CharObjectHashMapHelper method called byCharObjectHashMap.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.- Overrides:
keyToStringin classCharObjectHashMap<Long>
-
defaultSettings
-