public static final class H2KeepAlivePolicies.KeepAlivePolicyBuilder
extends java.lang.Object
H2ProtocolConfig.KeepAlivePolicy
.Constructor and Description |
---|
KeepAlivePolicyBuilder() |
Modifier and Type | Method and Description |
---|---|
H2KeepAlivePolicies.KeepAlivePolicyBuilder |
ackTimeout(java.time.Duration ackTimeout)
Set the maximum
Duration to wait for an acknowledgment of a previously sent
ping. |
H2ProtocolConfig.KeepAlivePolicy |
build()
Build a new
H2ProtocolConfig.KeepAlivePolicy . |
H2KeepAlivePolicies.KeepAlivePolicyBuilder |
idleDuration(java.time.Duration idleDuration)
Set the
Duration of idleness on a connection after which a
ping is sent. |
H2KeepAlivePolicies.KeepAlivePolicyBuilder |
withoutActiveStreams(boolean withoutActiveStreams)
|
public H2KeepAlivePolicies.KeepAlivePolicyBuilder idleDuration(java.time.Duration idleDuration)
Duration
of idleness on a connection after which a
ping is sent.idleDuration
- Duration
of idleness on a connection after which a
ping is sent.this
.H2ProtocolConfig.KeepAlivePolicy.idleDuration()
public H2KeepAlivePolicies.KeepAlivePolicyBuilder ackTimeout(java.time.Duration ackTimeout)
Duration
to wait for an acknowledgment of a previously sent
ping. If no acknowledgment is received, the
connection will be closed.ackTimeout
- Duration
to wait for an acknowledgment of a previously sent
ping.this
.H2ProtocolConfig.KeepAlivePolicy.ackTimeout()
public H2KeepAlivePolicies.KeepAlivePolicyBuilder withoutActiveStreams(boolean withoutActiveStreams)
withoutActiveStreams
- true
if
pings are expected when no streams are
active.this
.H2ProtocolConfig.KeepAlivePolicy.withoutActiveStreams()
public H2ProtocolConfig.KeepAlivePolicy build()
H2ProtocolConfig.KeepAlivePolicy
.H2ProtocolConfig.KeepAlivePolicy
.