Package io.servicetalk.http.netty
Class H2ProtocolConfigBuilder
java.lang.Object
io.servicetalk.http.netty.H2ProtocolConfigBuilder
Builder for
H2ProtocolConfig
.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
BuildsH2ProtocolConfig
.enableFrameLogging
(String loggerName, LogLevel logLevel, BooleanSupplier logUserData) Enables a logger for HTTP/2 frames.flowControlQuantum
(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).flowControlWindowIncrement
(int connectionWindowIncrement) Increment to apply toHttp2Settings.initialWindowSize()
for the connection stream.headersFactory
(HttpHeadersFactory headersFactory) Sets theHttpHeadersFactory
to be used for creatingHttpHeaders
when decoding HTTP messages.headersSensitivityDetector
(BiPredicate<CharSequence, CharSequence> headersSensitivityDetector) Sets the sensitivity detector to determine if a headername
/value
pair should be treated as sensitive.initialSettings
(Http2Settings settings) Sets the initial HTTP/2 Setting to for each h2 connection.Sets theH2ProtocolConfig.KeepAlivePolicy
to use.
-
Method Details
-
headersFactory
Sets theHttpHeadersFactory
to be used for creatingHttpHeaders
when decoding HTTP messages.- Parameters:
headersFactory
-HttpHeadersFactory
to be used for creatingHttpHeaders
when decoding HTTP messages- Returns:
this
-
headersSensitivityDetector
public H2ProtocolConfigBuilder headersSensitivityDetector(BiPredicate<CharSequence, CharSequence> headersSensitivityDetector) Sets the sensitivity detector to determine if a headername
/value
pair should be treated as sensitive.- Parameters:
headersSensitivityDetector
- theBiPredicate
<CharSequence
,CharSequence
> that returnstrue
if a header <name
,value
> pair should be treated as sensitive,false
otherwise- Returns:
this
-
enableFrameLogging
public H2ProtocolConfigBuilder enableFrameLogging(String loggerName, LogLevel logLevel, BooleanSupplier logUserData) Enables a logger for HTTP/2 frames.- Parameters:
loggerName
- provides the logger to log HTTP/2 frames.logLevel
- the level to log HTTP/2 frames.logUserData
-true
to include user data (e.g. data, headers, etc.).false
to exclude user data and log only network events. This method is invoked for each data object allowing for dynamic behavior.- Returns:
this
-
keepAlivePolicy
Sets theH2ProtocolConfig.KeepAlivePolicy
to use.- Parameters:
policy
-H2ProtocolConfig.KeepAlivePolicy
to use.- Returns:
this
- See Also:
-
initialSettings
Sets the initial HTTP/2 Setting to for each h2 connection.- Parameters:
settings
- the initial settings to for each h2 connection.- Returns:
this
- See Also:
-
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).- Parameters:
flowControlQuantum
- 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).- Returns:
this
-
flowControlWindowIncrement
Increment to apply toHttp2Settings.initialWindowSize()
for the connection stream. This expands the connection flow control window so a single stream can't consume all the flow control credits.- Parameters:
connectionWindowIncrement
- The number of bytes to increment the local flow control window for the connection stream.- Returns:
this
-
build
BuildsH2ProtocolConfig
.- Returns:
H2ProtocolConfig
-