Class StubSettings<SettingsT> (2.59.0)

public abstract class StubSettings<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

Name Description
SettingsT

Constructors

StubSettings(StubSettings.Builder builder)

protected StubSettings(StubSettings.Builder builder)

Constructs an instance of StubSettings.

Parameter
Name Description
builder Builder

Methods

getApiKey()

public final String getApiKey()

Gets the API Key that should be used for authentication.

Returns
Type Description
String

getBackgroundExecutorProvider()

public final ExecutorProvider getBackgroundExecutorProvider()
Returns
Type Description
ExecutorProvider

getClock()

public final ApiClock getClock()
Returns
Type Description
ApiClock

getCredentialsProvider()

public final CredentialsProvider getCredentialsProvider()
Returns
Type Description
CredentialsProvider

getEndpoint()

public String getEndpoint()
Returns
Type Description
String

the fully resolved endpoint used by the client

getExecutorProvider() (deprecated)

public final ExecutorProvider getExecutorProvider()

Deprecated. Please use #getBackgroundExecutorProvider().

Returns
Type Description
ExecutorProvider

getGdchApiAudience()

public final String getGdchApiAudience()

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

Returns
Type Description
String

getHeaderProvider()

public final HeaderProvider getHeaderProvider()
Returns
Type Description
HeaderProvider

getInternalHeaderProvider()

protected final HeaderProvider getInternalHeaderProvider()
Returns
Type Description
HeaderProvider

getMtlsEndpoint()

public final String getMtlsEndpoint()
Returns
Type Description
String

getQuotaProjectId()

public final String getQuotaProjectId()
Returns
Type Description
String

getServiceName()

protected String getServiceName()

Marked with Internal Api and meant to overriden by the generated subclasses. This getter is used to set the serviceName to the EndpointContext. The value in generated StubSettings subclasses comes from the proto files.

This should be effectively treated as an abstract method.

Returns
Type Description
String

getStreamWatchdogCheckInterval()

public final Duration getStreamWatchdogCheckInterval()

This method is obsolete. Use #getStreamWatchdogCheckIntervalDuration() instead.

Returns
Type Description
org.threeten.bp.Duration

getStreamWatchdogCheckIntervalDuration()

public final Duration getStreamWatchdogCheckIntervalDuration()
Returns
Type Description
Duration

getStreamWatchdogProvider()

public final WatchdogProvider getStreamWatchdogProvider()
Returns
Type Description
WatchdogProvider

getTracerFactory()

public ApiTracerFactory getTracerFactory()

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

Returns
Type Description
ApiTracerFactory

getTransportChannelProvider()

public final TransportChannelProvider getTransportChannelProvider()
Returns
Type Description
TransportChannelProvider

getUniverseDomain()

public final String getUniverseDomain()
Returns
Type Description
String

the fully resolved universe domain used by the client

toBuilder()

public abstract StubSettings.Builder toBuilder()
Returns
Type Description
Builder

toString()

public String toString()
Returns
Type Description
String
Overrides