Module io.helidon.webclient.grpc
Package io.helidon.webclient.grpc
Class GrpcClientProtocolConfig.BuilderBase.GrpcClientProtocolConfigImpl
java.lang.Object
io.helidon.webclient.grpc.GrpcClientProtocolConfig.BuilderBase.GrpcClientProtocolConfigImpl
- All Implemented Interfaces:
Prototype.Api
,NamedService
,GrpcClientProtocolConfig
,ProtocolConfig
- Enclosing class:
GrpcClientProtocolConfig.BuilderBase<BUILDER extends GrpcClientProtocolConfig.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends GrpcClientProtocolConfig>
protected static class GrpcClientProtocolConfig.BuilderBase.GrpcClientProtocolConfigImpl
extends Object
implements GrpcClientProtocolConfig
Generated implementation of the prototype, can be extended by descendant prototype implementations.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.helidon.webclient.grpc.GrpcClientProtocolConfig
GrpcClientProtocolConfig.Builder, GrpcClientProtocolConfig.BuilderBase<BUILDER extends GrpcClientProtocolConfig.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends GrpcClientProtocolConfig> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Create an instance providing a builder. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Whether to continue retrying after a poll wait timeout expired or not.boolean
int
hashCode()
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.toString()
default String
type()
Type identifying this protocol.
-
Constructor Details
-
GrpcClientProtocolConfigImpl
Create an instance providing a builder.- Parameters:
builder
- extending builder base of this prototype
-
-
Method Details
-
name
Description copied from interface:GrpcClientProtocolConfig
Name identifying this client protocol. Defaults to type.- Specified by:
name
in interfaceGrpcClientProtocolConfig
- Specified by:
name
in interfaceNamedService
- Returns:
- name of client protocol
-
pollWaitTime
Description copied from interface:GrpcClientProtocolConfig
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 byGrpcClientProtocolConfig.abortPollTimeExpired()
.- Specified by:
pollWaitTime
in interfaceGrpcClientProtocolConfig
- Returns:
- poll time as a duration
- See Also:
-
abortPollTimeExpired
public boolean abortPollTimeExpired()Description copied from interface:GrpcClientProtocolConfig
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.- Specified by:
abortPollTimeExpired
in interfaceGrpcClientProtocolConfig
- Returns:
- abort timeout flag
-
heartbeatPeriod
Description copied from interface:GrpcClientProtocolConfig
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.- Specified by:
heartbeatPeriod
in interfaceGrpcClientProtocolConfig
- Returns:
- heartbeat period
-
initBufferSize
public int initBufferSize()Description copied from interface:GrpcClientProtocolConfig
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.- Specified by:
initBufferSize
in interfaceGrpcClientProtocolConfig
- Returns:
- initial buffer size
-
nextRequestWaitTime
Description copied from interface:GrpcClientProtocolConfig
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)
.- Specified by:
nextRequestWaitTime
in interfaceGrpcClientProtocolConfig
- Returns:
- duration to wait for the next data request from listener
- See Also:
-
toString
-
equals
-
hashCode
public int hashCode() -
type
Type identifying this protocol.- Specified by:
type
in interfaceNamedService
- Returns:
- protocol type
-