Class NettyHttpServerConfiguration.Http2Settings
- Enclosing class:
NettyHttpServerConfiguration
- Since:
- 1.0
- Author:
- Graeme Rocher
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets theSETTINGS_HEADER_TABLE_SIZEvalue.@Nullable IntegerGets the initial flow-control window size of the connection as a whole.Gets theSETTINGS_INITIAL_WINDOW_SIZEvalue.Gets theSETTINGS_MAX_CONCURRENT_STREAMSvalue.Gets theSETTINGS_MAX_FRAME_SIZEvalue.Gets theSETTINGS_MAX_HEADER_LIST_SIZEvalue.Deprecated.io.netty.handler.codec.http2.Http2SettingsReturns netty's http2 settings.voidsetHeaderTableSize(@Nullable Long value) Sets theSETTINGS_HEADER_TABLE_SIZEvalue.voidsetInitialConnectionWindowSize(@Nullable Integer value) Sets the initial flow-control window size of the connection as a whole (HTTP/2 stream 0), i.e.voidsetInitialWindowSize(@Nullable Integer value) Sets theSETTINGS_INITIAL_WINDOW_SIZEvalue.voidsetMaxConcurrentStreams(Long value) Sets theSETTINGS_MAX_CONCURRENT_STREAMSvalue.voidsetMaxFrameSize(@Nullable Integer value) Sets theSETTINGS_MAX_FRAME_SIZEvalue.voidsetMaxHeaderListSize(Long value) Sets theSETTINGS_MAX_HEADER_LIST_SIZEvalue.voidsetPushEnabled(Boolean enabled) Deprecated.TheSETTINGS_ENABLE_PUSHsetting makes no sense when sent by the server, and clients must reject any setting exceptfalse(the default) according to the spec.
-
Constructor Details
-
Http2Settings
public Http2Settings()
-
-
Method Details
-
http2Settings
public io.netty.handler.codec.http2.Http2Settings http2Settings()Returns netty's http2 settings.- Returns:
- io.netty.handler.codec.http2.Http2Settings.
-
getHeaderTableSize
Gets theSETTINGS_HEADER_TABLE_SIZEvalue. If unavailable, returnsnull.- Returns:
- The header table size or
null.
-
setHeaderTableSize
Sets theSETTINGS_HEADER_TABLE_SIZEvalue.- Parameters:
value- The header table size.- Throws:
IllegalArgumentException- if verification of the setting fails.
-
getPushEnabled
Deprecated.TheSETTINGS_ENABLE_PUSHsetting makes no sense when sent by the server, and clients must reject any setting exceptfalse(the default) according to the spec.Gets theSETTINGS_ENABLE_PUSHvalue. If unavailable, returnsnull.- Returns:
- The
SETTINGS_ENABLE_PUSHvalue. If unavailable, returnsnull.
-
setPushEnabled
Deprecated.TheSETTINGS_ENABLE_PUSHsetting makes no sense when sent by the server, and clients must reject any setting exceptfalse(the default) according to the spec. Netty will refuse to write this setting altogether. To prevent this, this setter now does nothing and will be removed in a future release.Does nothing.- Parameters:
enabled- TheSETTINGS_ENABLE_PUSHvalue.
-
getMaxConcurrentStreams
Gets theSETTINGS_MAX_CONCURRENT_STREAMSvalue. If unavailable, returnsnull.- Returns:
- The
SETTINGS_MAX_CONCURRENT_STREAMSvalue. If unavailable, returnsnull.
-
setMaxConcurrentStreams
Sets theSETTINGS_MAX_CONCURRENT_STREAMSvalue.- Parameters:
value- TheSETTINGS_MAX_CONCURRENT_STREAMSvalue.- Throws:
IllegalArgumentException- if verification of the setting fails.
-
getInitialWindowSize
Gets theSETTINGS_INITIAL_WINDOW_SIZEvalue. If unavailable, returnsnull.- Returns:
- The
SETTINGS_INITIAL_WINDOW_SIZEvalue. If unavailable, returnsnull.
-
setInitialWindowSize
Sets theSETTINGS_INITIAL_WINDOW_SIZEvalue.- Parameters:
value- TheSETTINGS_INITIAL_WINDOW_SIZEvalue.- Throws:
IllegalArgumentException- if verification of the setting fails.
-
getInitialConnectionWindowSize
Gets the initial flow-control window size of the connection as a whole. If not configured, returnsnull.- Returns:
- The connection window size or
null. - Since:
- 5.2.2
- See Also:
-
setInitialConnectionWindowSize
Sets the initial flow-control window size of the connection as a whole (HTTP/2 stream 0), i.e. how many request body bytes a client may send across all streams of one connection before the server has to acknowledge them with aWINDOW_UPDATE.SETTINGS_INITIAL_WINDOW_SIZE(setInitialWindowSize(Integer)) only applies to individual streams. The connection window always starts at the protocol default of 65535 bytes, which caps the combined upload throughput of all streams on a connection at about 64 KiB per round trip unless it is raised. By default, the connection window is raised by twice the amount by whichinitial-window-sizeexceeds 65535, so that a single stream cannot use up the whole connection window; this is the same rule netty'sHttp2FrameCodecapplies. This property raises the connection window further, to the given number of bytes; it has no effect when the default derived from the stream window is already larger. The value must be at least 65535 and at most 2^31-1; the connection window can only be raised above the protocol default, never lowered.- Parameters:
value- The connection window size in bytes.- Throws:
IllegalArgumentException- if the value is out of range.- Since:
- 5.2.2
-
getMaxFrameSize
Gets theSETTINGS_MAX_FRAME_SIZEvalue. If unavailable, returnsnull.- Returns:
- The
SETTINGS_MAX_FRAME_SIZEvalue. If unavailable, returnsnull.
-
setMaxFrameSize
Sets theSETTINGS_MAX_FRAME_SIZEvalue.- Parameters:
value- TheSETTINGS_MAX_FRAME_SIZEvalue.- Throws:
IllegalArgumentException- if verification of the setting fails.
-
getMaxHeaderListSize
Gets theSETTINGS_MAX_HEADER_LIST_SIZEvalue. If unavailable, returnsnull.- Returns:
- The
SETTINGS_MAX_HEADER_LIST_SIZEvalue. If unavailable, returnsnull.
-
setMaxHeaderListSize
Sets theSETTINGS_MAX_HEADER_LIST_SIZEvalue.- Parameters:
value- TheSETTINGS_MAX_HEADER_LIST_SIZEvalue.- Throws:
IllegalArgumentException- if verification of the setting fails.
-
SETTINGS_ENABLE_PUSHsetting makes no sense when sent by the server, and clients must reject any setting exceptfalse(the default) according to the spec.