Package com.google.api.gax.rpc
Class ClientContext
java.lang.Object
com.google.api.gax.rpc.ClientContext
Encapsulates client state, including executor, credentials, and transport channel.
Unlike ClientSettings which allows users to configure the client,
ClientContext is intended to be used in generated code. Most users will not need to use it.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ClientContextcreate(ClientSettings settings) Instantiates the executor, credentials, and transport context based on the given client settings.static ClientContextcreate(StubSettings settings) Instantiates the executor, credentials, and transport context based on the given client settings.abstract List<BackgroundResource>The objects that need to be closed in order to clean up the resources created in the process of creating this ClientContext.abstract ApiClockgetClock()abstract com.google.auth.Credentialsabstract ApiCallContextabstract Stringabstract ScheduledExecutorServiceGets the executor to use for running scheduled API call logic (such as retries and long-running operations).abstract Stringabstract Watchdogabstract org.threeten.bp.Durationabstract ApiTracerFactoryGets theApiTracerFactorythat will be used to generate traces for operations.abstract TransportChannelstatic ClientContext.Builderabstract ClientContext.Builder
-
Constructor Details
-
ClientContext
public ClientContext()
-
-
Method Details
-
getBackgroundResources
The objects that need to be closed in order to clean up the resources created in the process of creating this ClientContext. This will include the closeables from the transport context. -
getExecutor
Gets the executor to use for running scheduled API call logic (such as retries and long-running operations). -
getCredentials
-
getTransportChannel
-
getHeaders
-
getInternalHeaders
-
getClock
-
getDefaultCallContext
-
getStreamWatchdog
-
getStreamWatchdogCheckInterval
-
getEndpoint
-
getQuotaProjectId
-
getTracerFactory
@BetaApi("The surface for tracing is not stable yet and may change in the future.") @Nonnull public abstract ApiTracerFactory getTracerFactory()Gets theApiTracerFactorythat will be used to generate traces for operations. -
newBuilder
-
toBuilder
-
create
Instantiates the executor, credentials, and transport context based on the given client settings.- Throws:
IOException
-
create
Instantiates the executor, credentials, and transport context based on the given client settings.- Throws:
IOException
-