Http2Settings Class — netty Architecture
Architecture documentation for the Http2Settings class in Http2Settings.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 0bc654ce_e607_2ea6_4098_4fbeb4bbc9c9["Http2Settings"] 7a1f0256_8b20_01e2_0f93_89e04712591b["Http2Settings.java"] 0bc654ce_e607_2ea6_4098_4fbeb4bbc9c9 -->|defined in| 7a1f0256_8b20_01e2_0f93_89e04712591b 2d64fbb4_1562_b7b4_b7a0_8a5498d03dad["Http2Settings()"] 0bc654ce_e607_2ea6_4098_4fbeb4bbc9c9 -->|method| 2d64fbb4_1562_b7b4_b7a0_8a5498d03dad 8cdc8938_3e13_a07b_dd11_88cf608f6fb1["Long()"] 0bc654ce_e607_2ea6_4098_4fbeb4bbc9c9 -->|method| 8cdc8938_3e13_a07b_dd11_88cf608f6fb1 bf6d1ed8_421d_b182_9d00_e5b4124f7c69["Boolean()"] 0bc654ce_e607_2ea6_4098_4fbeb4bbc9c9 -->|method| bf6d1ed8_421d_b182_9d00_e5b4124f7c69 9e519e59_8c0a_c39e_1e1d_f276c2360248["Integer()"] 0bc654ce_e607_2ea6_4098_4fbeb4bbc9c9 -->|method| 9e519e59_8c0a_c39e_1e1d_f276c2360248 45e0960d_5524_ce9c_6865_4f64e8437171["verifyStandardSetting()"] 0bc654ce_e607_2ea6_4098_4fbeb4bbc9c9 -->|method| 45e0960d_5524_ce9c_6865_4f64e8437171 de73e725_4080_4b68_8c6a_5d2dc2d8b4bb["String()"] 0bc654ce_e607_2ea6_4098_4fbeb4bbc9c9 -->|method| de73e725_4080_4b68_8c6a_5d2dc2d8b4bb
Relationship Graph
Source Code
codec-http2/src/main/java/io/netty/handler/codec/http2/Http2Settings.java lines 49–308
public final class Http2Settings extends CharObjectHashMap<Long> {
/**
* 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 int DEFAULT_CAPACITY = (int) (NUM_STANDARD_SETTINGS / DEFAULT_LOAD_FACTOR) + 1;
private static final Long FALSE = 0L;
private static final Long TRUE = 1L;
public Http2Settings() {
this(DEFAULT_CAPACITY);
}
public Http2Settings(int initialCapacity, float loadFactor) {
super(initialCapacity, loadFactor);
}
public Http2Settings(int initialCapacity) {
super(initialCapacity);
}
/**
* Adds the given setting key/value pair. For standard settings defined by the HTTP/2 spec, performs
* validation on the values.
*
* @throws IllegalArgumentException if verification for a standard HTTP/2 setting fails.
*/
@Override
public Long put(char key, Long value) {
verifyStandardSetting(key, value);
return super.put(key, value);
}
/**
* Gets the {@code SETTINGS_HEADER_TABLE_SIZE} value. If unavailable, returns {@code null}.
*/
public Long headerTableSize() {
return get(SETTINGS_HEADER_TABLE_SIZE);
}
/**
* Sets the {@code SETTINGS_HEADER_TABLE_SIZE} value.
*
* @throws IllegalArgumentException if verification of the setting fails.
*/
public Http2Settings headerTableSize(long value) {
put(SETTINGS_HEADER_TABLE_SIZE, Long.valueOf(value));
return this;
}
/**
* Gets the {@code SETTINGS_ENABLE_PUSH} value. If unavailable, returns {@code null}.
*/
public Boolean pushEnabled() {
Long value = get(SETTINGS_ENABLE_PUSH);
if (value == null) {
return null;
}
return TRUE.equals(value);
}
/**
* Sets the {@code SETTINGS_ENABLE_PUSH} value.
*/
public Http2Settings pushEnabled(boolean enabled) {
put(SETTINGS_ENABLE_PUSH, enabled ? TRUE : FALSE);
return this;
}
/**
* Gets the {@code SETTINGS_MAX_CONCURRENT_STREAMS} value. If unavailable, returns {@code null}.
*/
public Long maxConcurrentStreams() {
return get(SETTINGS_MAX_CONCURRENT_STREAMS);
}
/**
* Sets the {@code SETTINGS_MAX_CONCURRENT_STREAMS} value.
*
* @throws IllegalArgumentException if verification of the setting fails.
*/
Source
Frequently Asked Questions
What is the Http2Settings class?
Http2Settings is a class in the netty codebase, defined in codec-http2/src/main/java/io/netty/handler/codec/http2/Http2Settings.java.
Where is Http2Settings defined?
Http2Settings is defined in codec-http2/src/main/java/io/netty/handler/codec/http2/Http2Settings.java at line 49.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free