Class ClientContext.Builder (2.58.0)

public abstract static class ClientContext.Builder

Inheritance

java.lang.Object > ClientContext.Builder

Constructors

Builder()

public Builder()

Methods

build()

public abstract ClientContext build()
Returns
Type Description
ClientContext

setBackgroundResources(List<BackgroundResource> backgroundResources)

public abstract ClientContext.Builder setBackgroundResources(List<BackgroundResource> backgroundResources)
Parameter
Name Description
backgroundResources List<BackgroundResource>
Returns
Type Description
ClientContext.Builder

setClock(ApiClock clock)

public abstract ClientContext.Builder setClock(ApiClock clock)
Parameter
Name Description
clock ApiClock
Returns
Type Description
ClientContext.Builder

setCredentials(Credentials value)

public abstract ClientContext.Builder setCredentials(Credentials value)
Parameter
Name Description
value com.google.auth.Credentials
Returns
Type Description
ClientContext.Builder

setDefaultCallContext(ApiCallContext defaultCallContext)

public abstract ClientContext.Builder setDefaultCallContext(ApiCallContext defaultCallContext)
Parameter
Name Description
defaultCallContext ApiCallContext
Returns
Type Description
ClientContext.Builder

setEndpoint(String endpoint)

public abstract ClientContext.Builder setEndpoint(String endpoint)
Parameter
Name Description
endpoint String
Returns
Type Description
ClientContext.Builder

setExecutor(ScheduledExecutorService value)

public abstract ClientContext.Builder setExecutor(ScheduledExecutorService value)

Sets the executor to use for running scheduled API call logic (such as retries and long-running operations).

Parameter
Name Description
value ScheduledExecutorService
Returns
Type Description
ClientContext.Builder

setGdchApiAudience(String gdchApiAudience)

public abstract ClientContext.Builder setGdchApiAudience(String gdchApiAudience)

Sets the API audience used by com.google.auth.oauth2.GdchCredentials It cannot be used if other type of com.google.auth.Credentials is used

If the provided credentials already contain an api audience, it will be overriden by this one

Parameter
Name Description
gdchApiAudience String

the audience to be used - must be a valid URI string

Returns
Type Description
ClientContext.Builder

setHeaders(Map<String,String> headers)

public abstract ClientContext.Builder setHeaders(Map<String,String> headers)
Parameter
Name Description
headers Map<String,String>
Returns
Type Description
ClientContext.Builder

setInternalHeaders(Map<String,String> headers)

protected abstract ClientContext.Builder setInternalHeaders(Map<String,String> headers)
Parameter
Name Description
headers Map<String,String>
Returns
Type Description
ClientContext.Builder

setQuotaProjectId(String QuotaProjectId)

public abstract ClientContext.Builder setQuotaProjectId(String QuotaProjectId)
Parameter
Name Description
QuotaProjectId String
Returns
Type Description
ClientContext.Builder

setStreamWatchdog(Watchdog watchdog)

public abstract ClientContext.Builder setStreamWatchdog(Watchdog watchdog)
Parameter
Name Description
watchdog Watchdog
Returns
Type Description
ClientContext.Builder

setStreamWatchdogCheckInterval(Duration duration)

public final ClientContext.Builder setStreamWatchdogCheckInterval(Duration duration)

This method is obsolete. Use #setStreamWatchdogCheckIntervalDuration(java.time.Duration) instead.

Parameter
Name Description
duration org.threeten.bp.Duration
Returns
Type Description
ClientContext.Builder

setStreamWatchdogCheckIntervalDuration(Duration duration)

public abstract ClientContext.Builder setStreamWatchdogCheckIntervalDuration(Duration duration)
Parameter
Name Description
duration Duration
Returns
Type Description
ClientContext.Builder

setTracerFactory(ApiTracerFactory tracerFactory)

public abstract ClientContext.Builder setTracerFactory(ApiTracerFactory tracerFactory)

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

Parameter
Name Description
tracerFactory ApiTracerFactory

an instance ApiTracerFactory.

Returns
Type Description
ClientContext.Builder

setTransportChannel(TransportChannel transportChannel)

public abstract ClientContext.Builder setTransportChannel(TransportChannel transportChannel)
Parameter
Name Description
transportChannel TransportChannel
Returns
Type Description
ClientContext.Builder

setUniverseDomain(String universeDomain)

public abstract ClientContext.Builder setUniverseDomain(String universeDomain)
Parameter
Name Description
universeDomain String
Returns
Type Description
ClientContext.Builder