Package io.servicetalk.http.netty
Class H2KeepAlivePolicies.KeepAlivePolicyBuilder
- java.lang.Object
-
- io.servicetalk.http.netty.H2KeepAlivePolicies.KeepAlivePolicyBuilder
-
- Enclosing class:
- H2KeepAlivePolicies
public static final class H2KeepAlivePolicies.KeepAlivePolicyBuilder extends java.lang.Object
A builder ofH2ProtocolConfig.KeepAlivePolicy
.
-
-
Constructor Summary
Constructors Constructor Description KeepAlivePolicyBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description H2KeepAlivePolicies.KeepAlivePolicyBuilder
ackTimeout(java.time.Duration ackTimeout)
Set the maximumDuration
to wait for an acknowledgment of a previously sent ping.H2ProtocolConfig.KeepAlivePolicy
build()
Build a newH2ProtocolConfig.KeepAlivePolicy
.H2KeepAlivePolicies.KeepAlivePolicyBuilder
idleDuration(java.time.Duration idleDuration)
Set theDuration
of idleness on a connection after which a ping is sent.H2KeepAlivePolicies.KeepAlivePolicyBuilder
withoutActiveStreams(boolean withoutActiveStreams)
-
-
-
Method Detail
-
idleDuration
public H2KeepAlivePolicies.KeepAlivePolicyBuilder idleDuration(java.time.Duration idleDuration)
Set theDuration
of idleness on a connection after which a ping is sent.- Parameters:
idleDuration
-Duration
of idleness on a connection after which a ping is sent.- Returns:
this
.- See Also:
H2ProtocolConfig.KeepAlivePolicy.idleDuration()
-
ackTimeout
public H2KeepAlivePolicies.KeepAlivePolicyBuilder ackTimeout(java.time.Duration ackTimeout)
Set the maximumDuration
to wait for an acknowledgment of a previously sent ping. If no acknowledgment is received, the connection will be closed.- Parameters:
ackTimeout
-Duration
to wait for an acknowledgment of a previously sent ping.- Returns:
this
.- See Also:
H2ProtocolConfig.KeepAlivePolicy.ackTimeout()
-
withoutActiveStreams
public H2KeepAlivePolicies.KeepAlivePolicyBuilder withoutActiveStreams(boolean withoutActiveStreams)
- Parameters:
withoutActiveStreams
-true
if pings are expected when no streams are active.- Returns:
this
.- See Also:
H2ProtocolConfig.KeepAlivePolicy.withoutActiveStreams()
-
build
public H2ProtocolConfig.KeepAlivePolicy build()
Build a newH2ProtocolConfig.KeepAlivePolicy
.- Returns:
- new
H2ProtocolConfig.KeepAlivePolicy
.
-
-