Module io.helidon.webclient.grpc
Package io.helidon.webclient.grpc
Interface GrpcClientProtocolConfig
- All Superinterfaces:
NamedService
,ProtocolConfig
,Prototype.Api
- All Known Implementing Classes:
GrpcClientProtocolConfig.BuilderBase.GrpcClientProtocolConfigImpl
Configuration of a gRPC client.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic class
Fluent API builder forGrpcClientProtocolConfig
.static class
GrpcClientProtocolConfig.BuilderBase<BUILDER extends GrpcClientProtocolConfig.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends GrpcClientProtocolConfig> Fluent API builder base forGrpcClientProtocolConfig
. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Whether to continue retrying after a poll wait timeout expired or not.builder()
Create a new fluent API builder to customize configuration.builder
(GrpcClientProtocolConfig instance) Create a new fluent API builder from an existing instance.static GrpcClientProtocolConfig
create()
Create a new instance with default values.static GrpcClientProtocolConfig
Deprecated.static GrpcClientProtocolConfig
Create a new instance from configuration.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.name()
Name identifying this client protocol.When data has been received from the server but not yet requested by the client (i.e., listener), the implementation will wait for this duration before signaling an error.How long to wait for the next HTTP/2 data frame to arrive in underlying stream.default String
type()
Type identifying this protocol.
-
Method Details
-
builder
Create a new fluent API builder to customize configuration.- Returns:
- a new builder
-
builder
Create a new fluent API builder from an existing instance.- Parameters:
instance
- an existing instance used as a base for the builder- Returns:
- a builder based on an instance
-
create
Create a new instance from configuration.- Parameters:
config
- used to configure the new instance- Returns:
- a new instance configured from configuration
-
create
Deprecated.Create a new instance from configuration.- Parameters:
config
- used to configure the new instance- Returns:
- a new instance configured from configuration
-
create
Create a new instance with default values.- Returns:
- a new instance
-
name
String name()Name identifying this client protocol. Defaults to type.- Specified by:
name
in interfaceNamedService
- Returns:
- name of client protocol
-
pollWaitTime
Duration 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:
- poll time as a duration
- See Also:
-
abortPollTimeExpired
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:
- abort timeout flag
-
heartbeatPeriod
Duration 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:
- heartbeat period
-
initBufferSize
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:
- initial buffer size
-
nextRequestWaitTime
Duration nextRequestWaitTime()When data has been received from the server but not yet requested by the client (i.e., listener), the implementation will wait for this duration before signaling an error. If data is requested and more data is still in the queue, this time wait restarts until the next request is received. If duration expires, a status ofStatus.CANCELLED
is reported in the call toClientCall.Listener.onClose(io.grpc.Status, io.grpc.Metadata)
.- Returns:
- duration to wait for the next data request from listener
- See Also:
-
type
Type identifying this protocol.- Specified by:
type
in interfaceNamedService
- Returns:
- protocol type
-
create(io.helidon.config.Config)