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.
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-03-21 UTC."],[[["This webpage provides documentation for the `ClientContext` class in the Google API Client Library for Java, focusing on version 2.36.0 and offering links to documentation for a multitude of other versions, the most recent one being 2.63.1."],["`ClientContext` encapsulates client state, managing components such as the executor, credentials, and transport channel, which are crucial for client operations."],["`ClientContext` is typically utilized in generated code, therefore most users will not need to interact with this class directly."],["The class provides static methods like `create()` to instantiate `ClientContext` based on provided `ClientSettings` or `StubSettings` and a `newBuilder()` to return a ClientContext builder, in addition to various methods to access different components of the context such as the executor, credentials, and transport channel."],["`ClientContext` has methods to get resources, like the `getBackgroundResources()` method, and also manages scheduled API call logic and tracing through its executor and `ApiTracerFactory`, respectively."]]],[]]