Class ServiceStubsOptions
java.lang.Object
io.temporal.serviceclient.ServiceStubsOptions
- Direct Known Subclasses:
CloudServiceStubsOptions,OperatorServiceStubsOptions,WorkflowServiceStubsOptions
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final booleanIndicates whether an API key was provided, used for automatic TLS enablementprotected final io.grpc.ManagedChannelprotected final Consumer<io.grpc.ManagedChannelBuilder<?>> protected final DurationFrequency at which connection backoff is going to be resetstatic final DurationDefault timeout that will be used to reset connection backoff.static final DurationDefault timeout that will be used to enter idle channel state and reconnect to temporal server.static final Stringstatic final DurationDefault RPC timeout used for all non-long-poll and non-query calls.protected final BooleanIndicates whether basic HTTPS/SSL/TLS should be enabled.protected final booleanEnables keep alive ping from client to the server, which can help drop abruptly closed connections faster.protected final Collection<io.grpc.ClientInterceptor> gRPC client interceptors to be added to gRPC channelprotected final GrpcCompressionOutbound transport-level gRPC compression.protected final Collection<GrpcMetadataProvider> gRPC metadata/headers providers to be called on each gRPC request to supply additional headersprotected final DurationFrequency at which grpc connection channel will be moved into an idle state, triggering a new connection to the temporal frontend host.protected final io.grpc.MetadataOptional gRPC headersprotected final DurationHealthCheckAttemptTimeout specifies how to long to wait for service response on each health check attempt.protected final DurationHealthCheckTimeout defines how long client should be sending health check requests to the server before concluding that it is unavailable.protected final booleanIf true, keep alive ping will be allowed when there are no active RPCs.protected final DurationInterval at which server will be pinged in order to determine if connections are still alive.protected final DurationAmount of time that client would wait for the keep alive ping response from the server before closing the connection.protected final com.uber.m3.tally.Scopeprotected final DurationThe gRPC timeoutprotected final io.grpc.netty.shaded.io.netty.handler.ssl.SslContextThe user provided context for SSL/TLS over gRPC *protected final DurationSystemInfoTimeout specifies how to long to wait for service response on each health check attempt.protected final Stringtarget string to use for connection/channel inManagedChannelBuilder.forTarget(String) -
Method Summary
Modifier and TypeMethodDescriptionbooleanio.grpc.ManagedChannelConsumer<io.grpc.ManagedChannelBuilder<?>> Gives an opportunity to provide some additional configuration to the channel builder or override configurations done by the Temporal Stubs.booleanReturns whether gRPC should use SSL/TLS.booleanCollection<io.grpc.ClientInterceptor> io.grpc.Metadatabooleancom.uber.m3.tally.Scopeio.grpc.netty.shaded.io.netty.handler.ssl.SslContextinthashCode()toString()
-
Field Details
-
DEFAULT_LOCAL_DOCKER_TARGET
- See Also:
-
DEFAULT_RPC_TIMEOUT
Default RPC timeout used for all non-long-poll and non-query calls. -
DEFAULT_CONNECTION_BACKOFF_RESET_FREQUENCY
Default timeout that will be used to reset connection backoff. -
DEFAULT_GRPC_RECONNECT_FREQUENCY
Default timeout that will be used to enter idle channel state and reconnect to temporal server. -
channel
protected final io.grpc.ManagedChannel channel -
target
target string to use for connection/channel inManagedChannelBuilder.forTarget(String) -
channelInitializer
-
enableHttps
Indicates whether basic HTTPS/SSL/TLS should be enabled. Null means not explicitly set by the user, allowing runtime derivation of the effective value. -
apiKeyProvided
protected final boolean apiKeyProvidedIndicates whether an API key was provided, used for automatic TLS enablement -
sslContext
protected final io.grpc.netty.shaded.io.netty.handler.ssl.SslContext sslContextThe user provided context for SSL/TLS over gRPC * -
healthCheckAttemptTimeout
HealthCheckAttemptTimeout specifies how to long to wait for service response on each health check attempt. Default: 5s. -
systemInfoTimeout
SystemInfoTimeout specifies how to long to wait for service response on each health check attempt. Default: 5s. -
healthCheckTimeout
HealthCheckTimeout defines how long client should be sending health check requests to the server before concluding that it is unavailable. Defaults to 10s. -
enableKeepAlive
protected final boolean enableKeepAliveEnables keep alive ping from client to the server, which can help drop abruptly closed connections faster. -
keepAliveTime
Interval at which server will be pinged in order to determine if connections are still alive. -
keepAliveTimeout
Amount of time that client would wait for the keep alive ping response from the server before closing the connection. -
keepAlivePermitWithoutStream
protected final boolean keepAlivePermitWithoutStreamIf true, keep alive ping will be allowed when there are no active RPCs. -
rpcTimeout
The gRPC timeout -
connectionBackoffResetFrequency
Frequency at which connection backoff is going to be reset -
grpcReconnectFrequency
Frequency at which grpc connection channel will be moved into an idle state, triggering a new connection to the temporal frontend host. -
headers
protected final io.grpc.Metadata headersOptional gRPC headers -
grpcMetadataProviders
gRPC metadata/headers providers to be called on each gRPC request to supply additional headers -
grpcClientInterceptors
gRPC client interceptors to be added to gRPC channel -
metricsScope
protected final com.uber.m3.tally.Scope metricsScope -
grpcCompression
Outbound transport-level gRPC compression.
-
-
Method Details
-
getChannel
public io.grpc.ManagedChannel getChannel()- Returns:
- fully custom user-configured externally provided gRPC channel to use
- See Also:
-
getTarget
- Returns:
- the target string to use for connection/channel in
ManagedChannelBuilder.forTarget(String)
-
getChannelInitializer
Gives an opportunity to provide some additional configuration to the channel builder or override configurations done by the Temporal Stubs.Advanced API
- Returns:
- listener that will be called as a last step of channel creation if the channel is
configured by
ServiceStubsOptions.Builder.setTarget(String).
-
getEnableHttps
public boolean getEnableHttps()Returns whether gRPC should use SSL/TLS. This method computes the effective value based on:- If explicitly set via
ServiceStubsOptions.Builder.setEnableHttps(boolean), returns that value - If an API key was provided and no custom SSL context or channel is set, returns
true(auto-enabled) - Otherwise returns
false
Note: When
getSslContext()is set, TLS is handled by the SSL context regardless of this value.- Returns:
- if gRPC should use SSL/TLS
- If explicitly set via
-
getSslContext
public io.grpc.netty.shaded.io.netty.handler.ssl.SslContext getSslContext()- Returns:
- the gRPC SSL Context to use
-
getHealthCheckAttemptTimeout
- Returns:
- how to long to wait for service response on each health check attempt
-
getSystemInfoTimeout
- Returns:
- The timeout for the RPC made by the client to fetch server capabilities.
-
getHealthCheckTimeout
- Returns:
- duration of time to wait while checking server connection when creating new client
-
getEnableKeepAlive
public boolean getEnableKeepAlive()- Returns:
- true if ping from client to the server is enabled, which can help detect and drop abruptly closed connections faster
-
getKeepAliveTime
- Returns:
- interval at which server will be pinged in order to determine if connections are still alive
-
getKeepAliveTimeout
- Returns:
- amount of time that client would wait for the keep alive ping response from the server before closing the connection
-
getKeepAlivePermitWithoutStream
public boolean getKeepAlivePermitWithoutStream()- Returns:
- if keep alive ping will be allowed when there are no active RPCs
-
getRpcTimeout
- Returns:
- the rpc timeout value
-
getConnectionBackoffResetFrequency
- Returns:
- frequency at which connection backoff should be reset or null if backoff reset is disabled
-
getGrpcReconnectFrequency
- Returns:
- frequency at which grpc channel should be moved into an idle state
-
getHeaders
public io.grpc.Metadata getHeaders()- Returns:
- gRPC headers to be added to every call
-
getGrpcMetadataProviders
- Returns:
- gRPC metadata/headers providers to be called on each gRPC request to supply additional headers
-
getGrpcClientInterceptors
- Returns:
- gRPC client interceptors to be added to gRPC channel
-
getMetricsScope
@Nonnull public com.uber.m3.tally.Scope getMetricsScope()- Returns:
- scope to be used for metrics reporting
-
getGrpcCompression
- Returns:
- outbound transport-level gRPC compression used for requests.
- See Also:
-
equals
-
hashCode
-
toString
-