Class ClientContext.Builder (2.20.0)

Stay organized with collections Save and categorize content based on your preferences.
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
clockcom.google.api.core.ApiClock
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

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