Class StubSettings<SettingsT> (2.66.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

Methods

getApiKey()

  public 
  
 final 
  
 String 
  
 getApiKey 
 () 
 

Gets the API Key that should be used for authentication.

Returns
Type
Description

getBackgroundExecutorProvider()

  public 
  
 final 
  
 ExecutorProvider 
  
 getBackgroundExecutorProvider 
 () 
 
Returns
Type
Description

getClock()

  public 
  
 final 
  
 ApiClock 
  
 getClock 
 () 
 
Returns
Type
Description

getCredentialsProvider()

  public 
  
 final 
  
 CredentialsProvider 
  
 getCredentialsProvider 
 () 
 
Returns
Type
Description

getEndpoint()

  public 
  
 String 
  
 getEndpoint 
 () 
 
Returns
Type
Description

the fully resolved endpoint used by the client

getExecutorProvider() (deprecated)

  public 
  
 final 
  
 ExecutorProvider 
  
 getExecutorProvider 
 () 
 

Deprecated. Please use #getBackgroundExecutorProvider() .

Returns
Type
Description

getGdchApiAudience()

  public 
  
 final 
  
 String 
  
 getGdchApiAudience 
 () 
 

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

Returns
Type
Description

getHeaderProvider()

  public 
  
 final 
  
 HeaderProvider 
  
 getHeaderProvider 
 () 
 
Returns
Type
Description

getInternalHeaderProvider()

  protected 
  
 final 
  
 HeaderProvider 
  
 getInternalHeaderProvider 
 () 
 
Returns
Type
Description

getMtlsEndpoint()

  public 
  
 final 
  
 String 
  
 getMtlsEndpoint 
 () 
 
Returns
Type
Description

getQuotaProjectId()

  public 
  
 final 
  
 String 
  
 getQuotaProjectId 
 () 
 
Returns
Type
Description

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

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

getStreamWatchdogProvider()

  public 
  
 final 
  
 WatchdogProvider 
  
 getStreamWatchdogProvider 
 () 
 
Returns
Type
Description

getTracerFactory()

  public 
  
 ApiTracerFactory 
  
 getTracerFactory 
 () 
 

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

Returns
Type
Description

getTransportChannelProvider()

  public 
  
 final 
  
 TransportChannelProvider 
  
 getTransportChannelProvider 
 () 
 
Returns
Type
Description

getUniverseDomain()

  public 
  
 final 
  
 String 
  
 getUniverseDomain 
 () 
 
Returns
Type
Description

the fully resolved universe domain used by the client

toBuilder()

  public 
  
 abstract 
  
 StubSettings 
 . 
 Builder 
  
 toBuilder 
 () 
 
Returns
Type
Description

toString()

  public 
  
 String 
  
 toString 
 () 
 
Returns
Type
Description
Overrides
Design a Mobile Site
View Site in Mobile | Classic
Share by: