Class StubSettings<SettingsT extends StubSettings<SettingsT>>

java.lang.Object
com.google.api.gax.rpc.StubSettings<SettingsT>

public abstract class StubSettings<SettingsT extends StubSettings<SettingsT>> extends Object
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.

  • Constructor Details

    • StubSettings

      protected StubSettings(StubSettings.Builder builder)
      Constructs an instance of StubSettings.
  • Method Details

    • getExecutorProvider

      @Deprecated public final ExecutorProvider getExecutorProvider()
      Deprecated.
    • getBackgroundExecutorProvider

      public final ExecutorProvider getBackgroundExecutorProvider()
    • getTransportChannelProvider

      public final TransportChannelProvider getTransportChannelProvider()
    • getCredentialsProvider

      public final CredentialsProvider getCredentialsProvider()
    • getHeaderProvider

      public final HeaderProvider getHeaderProvider()
    • getInternalHeaderProvider

      protected final HeaderProvider getInternalHeaderProvider()
    • getClock

      public final ApiClock getClock()
    • getServiceName

      @InternalApi 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.

    • getUniverseDomain

      public final String getUniverseDomain()
      Returns:
      the fully resolved universe domain used by the client
    • getEndpoint

      public String getEndpoint()
      Returns:
      the fully resolved endpoint used by the client
    • getMtlsEndpoint

      public final String getMtlsEndpoint()
    • getQuotaProjectId

      public final String getQuotaProjectId()
    • getStreamWatchdogProvider

      @Nullable public final WatchdogProvider getStreamWatchdogProvider()
    • getStreamWatchdogCheckInterval

      @Nonnull @ObsoleteApi("Use getStreamWatchdogCheckIntervalDuration() instead") public final org.threeten.bp.Duration getStreamWatchdogCheckInterval()
      This method is obsolete. Use getStreamWatchdogCheckIntervalDuration() instead.
    • getStreamWatchdogCheckIntervalDuration

      @Nonnull public final Duration getStreamWatchdogCheckIntervalDuration()
    • getTracerFactory

      @BetaApi("The surface for tracing is not stable yet and may change in the future.") @Nonnull public ApiTracerFactory getTracerFactory()
      Gets the configured ApiTracerFactory that will be used to generate traces for operations.
    • getGdchApiAudience

      @Nullable public final String getGdchApiAudience()
      Gets the GDCH API audience to be used with GdchCredentials
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toBuilder

      public abstract StubSettings.Builder toBuilder()