Package io.servicetalk.http.netty
Interface H2ProtocolConfig
- All Superinterfaces:
HttpProtocolConfig
Configuration for HTTP/2 protocol.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface
A policy for sending PING frames to the peer. -
Method Summary
Modifier and TypeMethodDescriptiondefault String
alpnId()
TLS Application-Layer Protocol Negotiation (ALPN) Protocol ID of the protocol this configuration is for.default int
Provide a hint on the number of bytes that the flow controller will attempt to give to a stream for each allocation (assuming the stream has this much eligible data).default int
Number of bytes to increment via WINDOW_UPDATE for the connection.Get the logger configuration for HTTP/2 frames.default Http2Settings
Get theHttp2Settings
that provides a hint for the initial settings.ConfiguredH2ProtocolConfig.KeepAlivePolicy
.Methods inherited from interface io.servicetalk.http.api.HttpProtocolConfig
headersFactory
-
Method Details
-
alpnId
Description copied from interface:HttpProtocolConfig
TLS Application-Layer Protocol Negotiation (ALPN) Protocol ID of the protocol this configuration is for.- Specified by:
alpnId
in interfaceHttpProtocolConfig
- Returns:
- string representation of ALPN Identification Sequence
- See Also:
-
headersSensitivityDetector
BiPredicate<CharSequence,CharSequence> headersSensitivityDetector()- Returns:
BiPredicate
<CharSequence
,CharSequence
> that returnstrue
if a header <name
,value
> pair should be treated as sensitive,false
otherwise
-
frameLoggerConfig
Get the logger configuration for HTTP/2 frames.- Returns:
- the logger configuration to use for HTTP/2 frames or
null
to disable it.
-
keepAlivePolicy
H2ProtocolConfig.KeepAlivePolicy keepAlivePolicy()ConfiguredH2ProtocolConfig.KeepAlivePolicy
.- Returns:
- configured
H2ProtocolConfig.KeepAlivePolicy
.
-
initialSettings
Get theHttp2Settings
that provides a hint for the initial settings. Note that some settings may be ignored if not supported (e.g. push promise).- Returns:
- the
Http2Settings
that provides a hint for the initial settings. Note that some settings may be ignored if not supported (e.g. push promise).
-
flowControlQuantum
default int flowControlQuantum()Provide a hint on the number of bytes that the flow controller will attempt to give to a stream for each allocation (assuming the stream has this much eligible data).This maybe useful because the amount of bytes the local peer is permitted to write is limited based upon the remote peer's flow control window for each stream. Some flow controllers iterate over all streams (and may consider stream priority) that have data pending to write and allow them to write a subset of the available flow control window (aka a "quantum"). The larger this value may result in increased goodput/throughput on the connection, but increase latency on some streams (if flow control windows become constrained).
- Returns:
- number of bytes.
-
flowControlWindowIncrement
default int flowControlWindowIncrement()Number of bytes to increment via WINDOW_UPDATE for the connection. This value is applied on top ofHttp2Settings.initialWindowSize()
frominitialSettings()
for the connection (as opposed to individual request streams). This can be helpful to avoid a single stream consuming all the flow control credits.- Returns:
- The number of bytes to increment the local flow control window for the connection.
-