Class ClientContext.Builder (2.46.1)

public abstract static class ClientContext.Builder

Inheritance

java.lang.Object > ClientContext.Builder

Constructors

Builder()

public Builder()

Methods

build()

public abstract ClientContext build()
Returns
TypeDescription
ClientContext

setBackgroundResources(List<BackgroundResource> backgroundResources)

public abstract ClientContext.Builder setBackgroundResources(List<BackgroundResource> backgroundResources)
Parameter
NameDescription
backgroundResourcesList<BackgroundResource>
Returns
TypeDescription
ClientContext.Builder

setClock(ApiClock clock)

public abstract ClientContext.Builder setClock(ApiClock clock)
Parameter
NameDescription
clockApiClock
Returns
TypeDescription
ClientContext.Builder

setCredentials(Credentials value)

public abstract ClientContext.Builder setCredentials(Credentials value)
Parameter
NameDescription
valuecom.google.auth.Credentials
Returns
TypeDescription
ClientContext.Builder

setDefaultCallContext(ApiCallContext defaultCallContext)

public abstract ClientContext.Builder setDefaultCallContext(ApiCallContext defaultCallContext)
Parameter
NameDescription
defaultCallContextApiCallContext
Returns
TypeDescription
ClientContext.Builder

setEndpoint(String endpoint)

public abstract ClientContext.Builder setEndpoint(String endpoint)
Parameter
NameDescription
endpointString
Returns
TypeDescription
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
NameDescription
valueScheduledExecutorService
Returns
TypeDescription
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
NameDescription
gdchApiAudienceString

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

Returns
TypeDescription
ClientContext.Builder

setHeaders(Map<String,String> headers)

public abstract ClientContext.Builder setHeaders(Map<String,String> headers)
Parameter
NameDescription
headersMap<String,String>
Returns
TypeDescription
ClientContext.Builder

setInternalHeaders(Map<String,String> headers)

protected abstract ClientContext.Builder setInternalHeaders(Map<String,String> headers)
Parameter
NameDescription
headersMap<String,String>
Returns
TypeDescription
ClientContext.Builder

setQuotaProjectId(String QuotaProjectId)

public abstract ClientContext.Builder setQuotaProjectId(String QuotaProjectId)
Parameter
NameDescription
QuotaProjectIdString
Returns
TypeDescription
ClientContext.Builder

setStreamWatchdog(Watchdog watchdog)

public abstract ClientContext.Builder setStreamWatchdog(Watchdog watchdog)
Parameter
NameDescription
watchdogWatchdog
Returns
TypeDescription
ClientContext.Builder

setStreamWatchdogCheckInterval(Duration duration)

public abstract ClientContext.Builder setStreamWatchdogCheckInterval(Duration duration)
Parameter
NameDescription
durationorg.threeten.bp.Duration
Returns
TypeDescription
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
NameDescription
tracerFactoryApiTracerFactory

an instance ApiTracerFactory.

Returns
TypeDescription
ClientContext.Builder

setTransportChannel(TransportChannel transportChannel)

public abstract ClientContext.Builder setTransportChannel(TransportChannel transportChannel)
Parameter
NameDescription
transportChannelTransportChannel
Returns
TypeDescription
ClientContext.Builder

setUniverseDomain(String universeDomain)

public abstract ClientContext.Builder setUniverseDomain(String universeDomain)
Parameter
NameDescription
universeDomainString
Returns
TypeDescription
ClientContext.Builder