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 theHttpHeadersFactoryto be used for creatingHttpHeaderswhen decoding HTTP messages.headersSensitivityDetector(BiPredicate<CharSequence, CharSequence> headersSensitivityDetector) Sets the sensitivity detector to determine if a headername/valuepair should be treated as sensitive.initialSettings(Http2Settings settings) Sets the initial HTTP/2 Setting to for each h2 connection.Sets theH2ProtocolConfig.KeepAlivePolicyto use.
-
Method Details
-
headersFactory
Sets theHttpHeadersFactoryto be used for creatingHttpHeaderswhen decoding HTTP messages.- Parameters:
headersFactory-HttpHeadersFactoryto be used for creatingHttpHeaderswhen decoding HTTP messages- Returns:
this
-
headersSensitivityDetector
public H2ProtocolConfigBuilder headersSensitivityDetector(BiPredicate<CharSequence, CharSequence> headersSensitivityDetector) Sets the sensitivity detector to determine if a headername/valuepair should be treated as sensitive.- Parameters:
headersSensitivityDetector- theBiPredicate<CharSequence,CharSequence> that returnstrueif a header <name,value> pair should be treated as sensitive,falseotherwise- 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-trueto include user data (e.g. data, headers, etc.).falseto 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.KeepAlivePolicyto use.- Parameters:
policy-H2ProtocolConfig.KeepAlivePolicyto 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
-