Class StubSettings.Builder<SettingsT,B> (2.20.1) 
  
      
     
  
  
  
   
  
    
  
  
    
    
    
  Version 2.20.1keyboard_arrow_down  
  
 
    
    
    
    
      
  
  
  
    
public   abstract   static   class  StubSettings . Builder<SettingsT , B > 
   
  
  
  Type Parameters 
  
    
      
        Name  
        Description  
       
      
        SettingsT  
         
       
      
        B  
         
       
     
  
  Static Methods
   
   
  applyToAllUnaryMethods(Iterable<UnaryCallSettings.Builder<?,?>> methodSettingsBuilders, ApiFunction<UnaryCallSettings.Builder<?,?>,Void> settingsUpdater) 
  
    
protected   static   void   applyToAllUnaryMethods ( Iterable<UnaryCallSettings . Builder <? , ? >>  methodSettingsBuilders ,   ApiFunction<UnaryCallSettings . Builder <? , ? >, Void >  settingsUpdater )  
   
  Applies the given settings updater function to the given method settings builders.
 
  Parameters 
  
  Constructors
   
   
  Builder() 
  
   
  Builder(ClientContext clientContext) 
  
    
protected   Builder ( ClientContext   clientContext )  
   
  Parameter 
  
   
  Builder(StubSettings settings) 
  
    
protected   Builder ( StubSettings   settings )  
   
  Create a builder from a StubSettings object.
 
  Parameter 
  
  Methods
   
   
  <B>build() 
  
    
public   abstract   StubSettings<B>   <B>build ()  
   
  Returns 
  
  Exceptions 
  
   
  getBackgroundExecutorProvider() 
  
    
public   ExecutorProvider   getBackgroundExecutorProvider ()  
   
  Gets the ExecutorProvider that was previously set on this Builder.
 
  Returns 
  
   
  getClock() 
  
    
public   ApiClock   getClock ()  
   
  Gets the ApiClock that was previously set on this Builder.
 
  Returns 
  
    
      
        Type  
        Description  
       
      
        com.google.api.core.ApiClock  
         
       
     
  
   
  getCredentialsProvider() 
  
    
public   CredentialsProvider   getCredentialsProvider ()  
   
  Gets the CredentialsProvider that was previously set on this Builder.
 
  Returns 
  
   
  getEndpoint() 
  
    
public   String   getEndpoint ()  
   
  Returns 
  
   
  getExecutorProvider() (deprecated) 
  
    
public   ExecutorProvider   getExecutorProvider ()  
   
  
  Returns 
  
  
  
  
    
public   HeaderProvider   getHeaderProvider ()  
   
  Gets the custom HeaderProvider that was previously set on this Builder.
 
  Returns 
  
  
  
  
    
protected   HeaderProvider   getInternalHeaderProvider ()  
   
  Gets the internal HeaderProvider that was previously set on this Builder.
 
  Returns 
  
   
  getMtlsEndpoint() 
  
    
public   String   getMtlsEndpoint ()  
   
  Returns 
  
   
  getQuotaProjectId() 
  
    
public   String   getQuotaProjectId ()  
   
  Gets the QuotaProjectId that was previously set on this Builder.
 
  Returns 
  
   
  getStreamWatchdogCheckInterval() 
  
    
public   Duration   getStreamWatchdogCheckInterval ()  
   
  Returns 
  
    
      
        Type  
        Description  
       
      
        org.threeten.bp.Duration  
         
       
     
  
   
  getStreamWatchdogProvider() 
  
    
public   WatchdogProvider   getStreamWatchdogProvider ()  
   
  
  Returns 
  
   
  getTracerFactory() 
  
    
public   ApiTracerFactory   getTracerFactory ()  
   
  Returns 
  
   
  getTransportChannelProvider() 
  
    
public   TransportChannelProvider   getTransportChannelProvider ()  
   
  Gets the TransportProvider that was previously set on this Builder.
 
  Returns 
  
   
  self() 
  
  Returns 
  
   
  setBackgroundExecutorProvider(ExecutorProvider backgroundExecutorProvider) 
  
    
public   B   setBackgroundExecutorProvider ( ExecutorProvider   backgroundExecutorProvider )  
   
  Sets the executor to use for running scheduled API call logic (such as retries and
 long-running operations).
 
  Parameter 
  
  Returns 
  
   
  setClock(ApiClock clock) 
  
    
public   B   setClock ( ApiClock   clock )  
   
  Sets the clock to use for retry logic.
 
This will default to a system clock if it is not set.
 
  Parameter 
  
    
      
        Name  
        Description  
       
      
        clock  
        com.google.api.core.ApiClock  
       
     
  
  Returns 
  
   
  setCredentialsProvider(CredentialsProvider credentialsProvider) 
  
    
public   B   setCredentialsProvider ( CredentialsProvider   credentialsProvider )  
   
  Sets the CredentialsProvider to use for getting the credentials to make calls with.
 
  Parameter 
  
  Returns 
  
   
  setEndpoint(String endpoint) 
  
    
public   B   setEndpoint ( String   endpoint )  
   
  Parameter 
  
    
      
        Name  
        Description  
       
      
        endpoint  
        String  
       
     
  
  Returns 
  
   
  setExecutorProvider(ExecutorProvider executorProvider) (deprecated) 
  
    
public   B   setExecutorProvider ( ExecutorProvider   executorProvider )  
   
  
  Parameter 
  
  Returns 
  
  
  
  
    
public   B   setHeaderProvider ( HeaderProvider   headerProvider )  
   
  Sets the HeaderProvider for getting custom static headers for http requests. The header
 provider will be called during client construction only once. The headers returned by the
 provider will be cached and supplied as is for each request issued by the constructed client.
 Some reserved headers can be overridden (e.g. Content-Type) or merged with the default value
 (e.g. User-Agent) by the underlying transport layer.
 
  Parameter 
  
  Returns 
  
  
  
  
    
protected   B   setInternalHeaderProvider ( HeaderProvider   internalHeaderProvider )  
   
  Sets the HeaderProvider for getting internal (library-defined) static headers for http
 requests. The header provider will be called during client construction only once. The
 headers returned by the provider will be cached and supplied as is for each request issued by
 the constructed client. Some reserved headers can be overridden (e.g. Content-Type) or merged
 with the default value (e.g. User-Agent) by the underlying transport layer.
 
  Parameter 
  
  Returns 
  
   
  setMtlsEndpoint(String mtlsEndpoint) 
  
    
public   B   setMtlsEndpoint ( String   mtlsEndpoint )  
   
  Parameter 
  
    
      
        Name  
        Description  
       
      
        mtlsEndpoint  
        String  
       
     
  
  Returns 
  
   
  setQuotaProjectId(String quotaProjectId) 
  
    
public   B   setQuotaProjectId ( String   quotaProjectId )  
   
  Parameter 
  
    
      
        Name  
        Description  
       
      
        quotaProjectId  
        String  
       
     
  
  Returns 
  
   
  setStreamWatchdogCheckInterval(Duration checkInterval) 
  
    
public   B   setStreamWatchdogCheckInterval ( Duration   checkInterval )  
   
  Sets how often the Watchdog  will check ongoing streaming RPCs. Defaults to 10 secs.
 Use Duration#ZERO  to disable.
 
  Parameter 
  
    
      
        Name  
        Description  
       
      
        checkInterval  
        org.threeten.bp.Duration  
       
     
  
  Returns 
  
   
  setStreamWatchdogProvider(WatchdogProvider streamWatchdogProvider) 
  
    
public   B   setStreamWatchdogProvider ( WatchdogProvider   streamWatchdogProvider )  
   
  
  Parameter 
  
  Returns 
  
   
  setSwitchToMtlsEndpointAllowed(boolean switchToMtlsEndpointAllowed) 
  
    
protected   B   setSwitchToMtlsEndpointAllowed ( boolean   switchToMtlsEndpointAllowed )  
   
  Parameter 
  
    
      
        Name  
        Description  
       
      
        switchToMtlsEndpointAllowed  
        boolean  
       
     
  
  Returns 
  
   
  setTracerFactory(ApiTracerFactory tracerFactory) 
  
    
public   B   setTracerFactory ( ApiTracerFactory   tracerFactory )  
   
  
  Parameter 
  
  Returns 
  
   
  setTransportChannelProvider(TransportChannelProvider transportChannelProvider) 
  
    
public   B   setTransportChannelProvider ( TransportChannelProvider   transportChannelProvider )  
   
  Sets the TransportProvider to use for getting the transport-specific context to make calls
 with.
 
  Parameter 
  
  Returns 
  
   
  toString() 
  
  Returns 
  
  Overrides 
  
 
     
    
  
  
  
     
  
 
  
    
    
      
       
    
    
  
  
 
  Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
  Last updated 2025-10-30 UTC.
 
 
  
  
  
    
      [[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-10-30 UTC."],[],[]]