Class StubSettings<SettingsT> (2.50.0)

publicabstractclassStubSettings<SettingsT>

A base settings class to configure a client stub class.

This base class includes settings that are applicable to all services, which includes things like settings for creating an executor, credentials, transport-specific settings, and identifiers for http headers.

If no ExecutorProvider is set, then InstantiatingExecutorProvider will be used, which creates a default executor.

Inheritance

java.lang.Object >StubSettings<SettingsT>

Type Parameter

NameDescription
SettingsT

Constructors

StubSettings(StubSettings.Builder builder)

protectedStubSettings(StubSettings.Builderbuilder)

Constructs an instance of StubSettings.

Parameter
NameDescription
builderBuilder

Methods

getBackgroundExecutorProvider()

publicfinalExecutorProvidergetBackgroundExecutorProvider()
Returns
TypeDescription
ExecutorProvider

getClock()

publicfinalApiClockgetClock()
Returns
TypeDescription
ApiClock

getCredentialsProvider()

publicfinalCredentialsProvidergetCredentialsProvider()
Returns
TypeDescription
CredentialsProvider

getEndpoint()

publicStringgetEndpoint()
Returns
TypeDescription
String

the fully resolved endpoint used by the client

getExecutorProvider() (deprecated)

publicfinalExecutorProvidergetExecutorProvider()

Deprecated.Please use#getBackgroundExecutorProvider().

Returns
TypeDescription
ExecutorProvider

getGdchApiAudience()

publicfinalStringgetGdchApiAudience()

Gets the GDCH API audience to be used withcom.google.auth.oauth2.GdchCredentials

Returns
TypeDescription
String

getHeaderProvider()

publicfinalHeaderProvidergetHeaderProvider()
Returns
TypeDescription
HeaderProvider

getInternalHeaderProvider()

protectedfinalHeaderProvidergetInternalHeaderProvider()
Returns
TypeDescription
HeaderProvider

getMtlsEndpoint()

publicfinalStringgetMtlsEndpoint()
Returns
TypeDescription
String

getQuotaProjectId()

publicfinalStringgetQuotaProjectId()
Returns
TypeDescription
String

getServiceName()

protectedStringgetServiceName()
Returns
TypeDescription
String

getStreamWatchdogCheckInterval()

publicfinalDurationgetStreamWatchdogCheckInterval()
Returns
TypeDescription
org.threeten.bp.Duration

getStreamWatchdogProvider()

publicfinalWatchdogProvidergetStreamWatchdogProvider()
Returns
TypeDescription
WatchdogProvider

getTracerFactory()

publicApiTracerFactorygetTracerFactory()

Beta

The surface for tracing is not stable yet and may change in the future.

This feature is covered by thePre-GA Offerings Terms of the Terms of Service. Pre-GA libraries might have limited support, and changes to pre-GA libraries might not be compatible with other pre-GA versions. For more information, see the launch stage descriptions.

Gets the configuredApiTracerFactory that will be used to generate traces for operations.

Returns
TypeDescription
ApiTracerFactory

getTransportChannelProvider()

publicfinalTransportChannelProvidergetTransportChannelProvider()
Returns
TypeDescription
TransportChannelProvider

getUniverseDomain()

publicfinalStringgetUniverseDomain()
Returns
TypeDescription
String

the fully resolved universe domain used by the client

toBuilder()

publicabstractStubSettings.BuildertoBuilder()
Returns
TypeDescription
Builder

toString()

publicStringtoString()
Returns
TypeDescription
String
Overrides

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-01-31 UTC.