Module io.helidon.webclient.grpc
Package io.helidon.webclient.grpc
Class GrpcClientProtocolConfig.BuilderBase<BUILDER extends GrpcClientProtocolConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends GrpcClientProtocolConfig>
java.lang.Object
io.helidon.webclient.grpc.GrpcClientProtocolConfig.BuilderBase<BUILDER,PROTOTYPE>
- Type Parameters:
BUILDER
- type of the builder extending this abstract builderPROTOTYPE
- type of the prototype interface that would be built byPrototype.Builder.buildPrototype()
- All Implemented Interfaces:
Prototype.Builder<BUILDER,
,PROTOTYPE> Prototype.ConfiguredBuilder<BUILDER,
PROTOTYPE>
- Direct Known Subclasses:
GrpcClientProtocolConfig.Builder
- Enclosing interface:
GrpcClientProtocolConfig
public abstract static class GrpcClientProtocolConfig.BuilderBase<BUILDER extends GrpcClientProtocolConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends GrpcClientProtocolConfig>
extends Object
implements Prototype.ConfiguredBuilder<BUILDER,PROTOTYPE>
Fluent API builder base for
GrpcClientProtocolConfig
.-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static class
Generated implementation of the prototype, can be extended by descendant prototype implementations. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Whether to continue retrying after a poll wait timeout expired or not.abortPollTimeExpired
(boolean abortPollTimeExpired) Whether to continue retrying after a poll wait timeout expired or not.config()
If this instance was configured, this would be the config instance used.Update builder from configuration (node of this type).from
(GrpcClientProtocolConfig prototype) Update this builder from an existing prototype instance.from
(GrpcClientProtocolConfig.BuilderBase<?, ?> builder) Update this builder from an existing prototype builder instance.How often to send a heartbeat (HTTP/2 ping) to check if the connection is still alive.heartbeatPeriod
(Duration heartbeatPeriod) How often to send a heartbeat (HTTP/2 ping) to check if the connection is still alive.int
Initial buffer size used to serialize gRPC request payloads.initBufferSize
(int initBufferSize) Initial buffer size used to serialize gRPC request payloads.name()
Name identifying this client protocol.Name identifying this client protocol.How long to wait for the next HTTP/2 data frame to arrive in underlying stream.pollWaitTime
(Duration pollWaitTime) How long to wait for the next HTTP/2 data frame to arrive in underlying stream.protected void
Handles providers and decorators.toString()
protected void
Validates required properties.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.helidon.builder.api.Prototype.Builder
buildPrototype, self
Methods inherited from interface io.helidon.builder.api.Prototype.ConfiguredBuilder
discoverService, discoverServices
-
Constructor Details
-
BuilderBase
protected BuilderBase()Protected to support extensibility.
-
-
Method Details
-
from
Update this builder from an existing prototype instance. This method disables automatic service discovery.- Parameters:
prototype
- existing prototype to update this builder from- Returns:
- updated builder instance
-
from
Update this builder from an existing prototype builder instance.- Parameters:
builder
- existing builder prototype to update this builder from- Returns:
- updated builder instance
-
config
Update builder from configuration (node of this type). If a value is present in configuration, it would override currently configured values.- Specified by:
config
in interfacePrototype.ConfiguredBuilder<BUILDER extends GrpcClientProtocolConfig.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends GrpcClientProtocolConfig> - Parameters:
config
- configuration instance used to obtain values to update this builder- Returns:
- updated builder instance
-
name
Name identifying this client protocol. Defaults to type.- Parameters:
name
- name of client protocol- Returns:
- updated builder instance
- See Also:
-
pollWaitTime
How long to wait for the next HTTP/2 data frame to arrive in underlying stream. Whether this is a fatal error or not is controlled byabortPollTimeExpired()
.- Parameters:
pollWaitTime
- poll time as a duration- Returns:
- updated builder instance
- See Also:
-
abortPollTimeExpired
Whether to continue retrying after a poll wait timeout expired or not. If a read operation timeouts out and this flag is set tofalse
, the event is logged and the client will retry. Otherwise, an exception is thrown.- Parameters:
abortPollTimeExpired
- abort timeout flag- Returns:
- updated builder instance
- See Also:
-
heartbeatPeriod
How often to send a heartbeat (HTTP/2 ping) to check if the connection is still alive. This is useful for long-running, streaming gRPC calls. It is turned off by default but can be enabled by setting the period to a value greater than 0.- Parameters:
heartbeatPeriod
- heartbeat period- Returns:
- updated builder instance
- See Also:
-
initBufferSize
Initial buffer size used to serialize gRPC request payloads. Buffers shall grow according to the payload size, but setting this initial buffer size to a larger value may improve performance for certain applications.- Parameters:
initBufferSize
- initial buffer size- Returns:
- updated builder instance
- See Also:
-
name
Name identifying this client protocol. Defaults to type.- Returns:
- the name
-
pollWaitTime
How long to wait for the next HTTP/2 data frame to arrive in underlying stream. Whether this is a fatal error or not is controlled byabortPollTimeExpired()
.- Returns:
- the poll wait time
- See Also:
-
abortPollTimeExpired
public boolean abortPollTimeExpired()Whether to continue retrying after a poll wait timeout expired or not. If a read operation timeouts out and this flag is set tofalse
, the event is logged and the client will retry. Otherwise, an exception is thrown.- Returns:
- the abort poll time expired
-
heartbeatPeriod
How often to send a heartbeat (HTTP/2 ping) to check if the connection is still alive. This is useful for long-running, streaming gRPC calls. It is turned off by default but can be enabled by setting the period to a value greater than 0.- Returns:
- the heartbeat period
-
initBufferSize
public int initBufferSize()Initial buffer size used to serialize gRPC request payloads. Buffers shall grow according to the payload size, but setting this initial buffer size to a larger value may improve performance for certain applications.- Returns:
- the init buffer size
-
config
If this instance was configured, this would be the config instance used.- Returns:
- config node used to configure this builder, or empty if not configured
-
toString
-
preBuildPrototype
protected void preBuildPrototype()Handles providers and decorators. -
validatePrototype
protected void validatePrototype()Validates required properties.
-